News for hackers. Stuff that matters.
Re:The paradigms of programming by bpyne on Monday January 29, 2018 @12:08PM (#16258796)
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.)
Re:The paradigms of programming by sigstoat on Monday January 29, 2018 @12:34PM (#16259038)
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

Re:The paradigms of programming by bpyne on Monday January 29, 2018 @01:26PM (#16259472)
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.

Re:The paradigms of programming by WorldMaker on Monday January 29, 2018 @05:15PM (#16261131)
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.

Re:The paradigms of programming by gizmo385 on Monday January 29, 2018 @12:36PM (#16259060)
I've never heard this before. Based on my (relatively limited) experience with JavaScript, they don't seem alike at all.
Re:The paradigms of programming by bpyne on Monday January 29, 2018 @12:56PM (#16259229)