8 ms·
Javascript is modeled on Scheme. Can you create DSL's in JS? (Legitimate question, I'm not familiar enough with JS to know for sure. Theoretically, it seems pos
by bpyne 9y ago
Javascript is modeled on Scheme. Can you create DSL's in JS? (Legitimate question, I'm not familiar enough with JS to know for sure. Theoretically, it seems possible.)
- sigstoat 9y agough, the only thing javascript has in common with scheme is first class functions. http://journal.stuffwithstuff.com/2013/07/18/javascript-isnt-scheme/ http://journal.stuffwithstuff.com/2013/07/18/javascript-isnt... https://news.ycombinator.com/item?id=6068360 https://news.ycombinator.com/item?id=6068360
- bpyne 9y agoFrom your first link... 1) Minimalism. 2) Dynamic typing. 3) First-class functions and closures. "Modeled on" <> "is" Brendan Eich admired Scheme and was still very familiar with SICP at the time. Perhaps "inspired by Scheme" would clear up the misunderstanding? My question was about creating DSL's in JS. Is it simple enough that people actually do it in professional software development? If it is, then I call into question the assertion that the majority of the programming community doesn't want to use languages giving them that much freedom.
- gizmo385 9y agoI've never heard this before. Based on my (relatively limited) experience with JavaScript, they don't seem alike at all.
- bpyne 9y agohttps://readwrite.com/2011/07/22/javascript-was-no-accident/ https://readwrite.com/2011/07/22/javascript-was-no-accident/
- WorldMaker 9y agoThe biggest impediment in JS I think to DSL creation is how little power JS has in operator overloading. There are some interesting things people have done with fake operator overloading: http://2ality.com/2011/12/fake-operator-overloading.html http://2ality.com/2011/12/fake-operator-overloading.html I've not seen a JS DSL attempt that wasn't merely a "toy", but there's probably more room to explore ideas than people give JS credit for. You could also argue that there are plenty of DSLs out there as things like Babel plugins.