3 ms·
One of the ideas of Lisp is that you can extend/change the language to bring it near the actual domain level. The so-called "Embedded Domain Specific Language"
by lispm 3y ago
One of the ideas of Lisp is that you can extend/change the language to bring it near the actual domain level. The so-called "Embedded Domain Specific Language" is common in Lisp.
- leetrout 3y agoIn my VERY limited experience this is only maintainable in very capable hands. They all start off OK and then creep and bloat.
- taeric 3y agoIn my not so limited experience, this is true of all programming.
- wtetzner 3y agoTo be fair, I don't think I'd want someone who's not very capable working on anything important, no matter what language they're using. I know it happens all the time, but I don't think that's a particularly compelling argument.
- p_l 3y agoI'd argue that's usually the case, because writing little language inside your normal language is full of problems, compiler writing is neither taught much anymore nor well supported (this is not a dig on the programmers - it's more that it feels like we're told that this and that is magic and should be left for the wizards). So then you finally find yourself needing to do something that requires DSL, and you quickly end up on the annoying self-destructive treadmill of growing from small simple grokkable config file to something that should be put out of its misery (and the misery it forces on developers). FWIW, some languages make it (IMO) much easier to handle that, if one decides from start to "embed" the DSL - Lisps are infamous on this, but this works just as well with Ruby, builder patterns in various languages (this can be a bit more prone to error though), or the less liked languages like poor TCL.
- deleted 3y ago[deleted]
- nvy 3y agoMy gut says this is the actual reason why lisp remains niche; everyone wants to make their own DSLs all the time.
- Jach 3y agoYour gut is wrong in this instance.
- astrange 3y agoThe problem with this is that it's the inverse of "rule of least power"; making the most powerful programming language possible means there's no way to know if your program is actually correct and no tools to find out.
- kazinator 3y ago> everyone wants to make their own DSLs all the time. Including people not working in Lisp. - Code generation. - Frameworks. - Embedded interpreters. The Unix project was a hotbed of DSLs: shell, lex, yacc, make, troff, pic, eqn, awk, dc, bc, ... the C preprocessor started as an external utility. Javascript, Python, Ruby: all hotbeds of frameworking, monkey-patching, generating ....
- deleted 3y ago[deleted]