Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.)


ugh, the only thing javascript has in common with scheme is first class functions.

http://journal.stuffwithstuff.com/2013/07/18/javascript-isnt...

https://news.ycombinator.com/item?id=6068360


From 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.


The 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

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.


I've never heard this before. Based on my (relatively limited) experience with JavaScript, they don't seem alike at all.





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: