Giter Club home page Giter Club logo

Comments (2)

greghendershott avatar greghendershott commented on May 26, 2024

syntax-e and syntax->datum were discussed earlier, in 3.1: syntax->datum is syntax-e applied recursively.

You could use syntax->datum here instead. But using syntax-e expresses that we expect the syntax to be an identifier that results in a symbol. And if it isn't, there will be a compile-time error.

(The error message will talk about stuff inside the macro implementation, which isn't very helpful to a user of the macro. (We discuss that later. Hint: Using syntax-parse with the id class would be wonderful.) But at least it will be most proximate to the problem inside the implementation, i.e. it will "go wrong quicker".)

Does that help?

from fear-of-macros.

nadeemabdulhamid avatar nadeemabdulhamid commented on May 26, 2024

OK, I see. It looks to me like the compile-time error is the same, whether you use syntax->datum or syntax-e, but I guess avoiding the recursive application is a little more efficient, perhaps. It was just that the earlier definitions of hyphen-define/... in the sections above all used syntax->datum but at that point it switches to syntax-e and I wasn't sure if there was some special reason that syntax->datum couldn't be used there as well. Thanks!

from fear-of-macros.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.