News for hackers. Stuff that matters.
Re:So You Want to Write Your Own Language (2014) by dozzie on Friday May 19, 2017 @04:52PM (#14379268)
> how easy it makes to create a DSL (without leaving it).

Pretty much impossible. If you don't leave your original language, you don't use domain specific language, you just have general purpose language with domain specific API.

Re:So You Want to Write Your Own Language (2014) by Koshkin on Saturday May 20, 2017 @09:07AM (#14382195)
But what is an API? Is it just a set of functions? Even then, it is already a language, with its own vocabulary. Or, is it a set of classes, interfaces, etc.? Then, even more so. And so on. Limitations and particulars of the syntax of a host language do not matter as much as you may think. Also, if you look close enough, you will realize that most of the languages already are, in fact, combinations of various built-in sublanguages, each having its own "subsyntax". What matters is the ease with which the host allows to create a new sublanguage that suits a particular purpose.
Re:So You Want to Write Your Own Language (2014) by TeMPOraL on Friday May 19, 2017 @06:50PM (#14379913)
You're missing the point. Some programming languages (Lisp family in particular) allow you to build DSLs directly, with the tools the language itself provides.
Re:So You Want to Write Your Own Language (2014) by dozzie on Saturday May 20, 2017 @06:25AM (#14381718)
And then, inside this "DSL" in Lisp, can you have a completely different language, with significant spaces and unmatched parentheses? Or is it just Lisp data structures that are then interpreted and you're pretending to use language other than Lisp because of its flexible data structures notation?
Re:So You Want to Write Your Own Language (2014) by shakna on Saturday May 20, 2017 @09:05AM (#14382190)
Yes, with reader macros. So far that you can have C[0], as you know it.

[0] http://pkgs.racket-lang.org/package/c

Re:So You Want to Write Your Own Language (2014) by TeMPOraL on Saturday May 20, 2017 @07:26AM (#14381901)
With reader macros, yes you can.