One way the student languages from HtDP are different from most Racket DSLs and langs is that, in the service of regularity and nice error messages, they take away many convenient and powerful features of the full Racket language. There is not really an "escape hatch" into full Racket, other than importing libraries.
In contrast, most Racket language extensions either simply add new language constructs to racket/base—think of the contract system, or the class-based object system—or provide forms very similar to the racket/base form, but with some refinement: #lang web-server transforms modules to make continuations serializable at interaction points, or Typed Racket adds syntax for specifying types. So starting your readers with a DSL doesn't have to mean that they have a heavily-restricted language overall (or you could be really ambitious and provide both a (require railroad) library and a #lang railroad/beginner). My first experience with Racket was through HtDP, which I loved, but, while I understand the good reasons for the teaching languages (especially the great error messages for beginners), I also have mixed feelings about them. For students like me who already had some (imperative, non-parenthesized) coding experience, there was a lot of complaining about conveniences of other languages that seemed to be missing from *SL (e.g. I believe BSL doesn't even have a mechanism for giving temporary names to values). When I tell other people who've been through HtDP that Racket is now my language of choice, I often get reactions like "Why would you want to use that for a real project?" and have to explain that Racket is not the language we learned in class. I think the text of the second edition may do a better job at making that distinction: we mostly used the first edition with little bits of the second, and certainly it was more confusing when everything was just called "Scheme." -Philip On Mon, Apr 2, 2018 at 1:30 AM, Stephen Smith <stephen1965sm...@gmail.com> wrote: > Railroad-simulation language, absolutely! One of the key reasons that > Racket is on the top of the list. But what I didn't think of was to have > the reader use the DSL first. I was initially planning to develop the DSL > as a later part of the book - doing it the hard way perhaps. > > That has always been the one thing I wasn't crazy about with htdp, > starting with the Beginning Student language, but that's just me > personally. I understand the reasons for the approach. I look at it as, "I > don't want training wheels - let me take the real thing for a ride!", and > deal with the consequences later - an > I-wanna-know-what's-under-the-hood-right-now > type of guy. For that reason, I never considered something like that for my > book, but the more I think of it now, it kind of makes a lot of sense for > my audience? I've always looked at it from an experienced programmer's > point of view - which doesn't necessarily fit best here. > > Thanks Matthias for giving me this suggestion to think about. I might have > a lot more work to do to get started using that approach, but in the long > run, as you say, it might get them more interested in the programming part. > Much appreciated food for thought. > > > > On Sunday, April 1, 2018 at 8:23:32 PM UTC-4, Matthias Felleisen wrote: >> >> >> On Apr 1, 2018, at 12:57 PM, Stephen Smith <stephen1...@gmail.com> wrote: >> >> my (book) project is for model railroad hobbyists (many if not most who >> have never programmed before). >> >> >> >> Have you considered the development of a railroad-simulation language >> within Racket that fits your domain? If you can provide people with a >> language that fits their problem area, they might be more interested in >> learning more about programming per se. Since embedded DSLs usually have a >> natural backdoor, this might be an approach that works well. >> >> In my current “hack your own language” course, some kids have gone a step >> further. They are interested in music theory. So they implemented a >> language for specifying languages in which students can then create >> compositions of choral music and the composition is statically checked >> before they even turn it in. The teacher can create a language per weekly >> homework and teh students get to see the progression. At the same time, >> there are several ways to dive into Racket from each level. >> >> — 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. > -- 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.