> On Mar 1, 2019, at 2:15 AM, Aidan Gauland <aidal...@fastmail.net> wrote:
>
> On 24/02/19 12:08 PM, Matthias Felleisen wrote:
>> 2. The means of implementation in Racket are radically different from a
>> lexer-parser approach.
> Wait, does this mean that the Beautiful Racket book is leading me down the
> wrong path? I'm in the middle of the bf chapter
> <https://beautifulracket.com/bf/>, which (if I am understanding it correctly,
> is using a lexer and a parser.
Please read this comment in context. This line is a response to a particular
point raised in the Reddit link of the original post. On this Reddit thread,
someone seems to confuse creating DSLs with writing new syntax for more-or-less
standard semantic concepts. For such people, it matters to find a conventional
Lex-Yacc (replace with modern words) tool chain plus perhaps some support for
backend creation.
Now in light of this explanation,
— BR doesn’t use an external tool chain but lexer and parser libraries
— these libraries are programmed within the language
— the target are Racket syntax forms, plus some tailor-made macros
— the goal is the creation of #lang Languages.
This approach is more powerful than what these people imagine. And no matter
what we will do, more power requires a bit more work—which will pay off in the
long run.
;; - - -
But I also wrote this:
> 3. The nature of languages ranges from
> — stand-alone languages with ugly syntax (example: datalog)
> — #lang stand-alone DSLs (config, scribble)
> — #lang language mixins (s-expr, 2d)
> — embedded DSLs with mostly coarse-grained interactions with Racket
> (redex)
> — embedded DSLs with fine-grained interaction with Racket
What you need to understand is that BR focuses mostly on the first two bullets.
You are likely to get some ideas about the last ones, too, but that’s not the
same as a paper/tutorial/book that would focus on those. And honestly, after 30
years I am still working with PhD students to get this right.
Don’t hold your breath this year, but perhaps next year :)
— Matthias
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.