4 ms·
I'm starting to be increasingly certain that making a new (sub)language to express and solve your problems is the highest form of programming. You'd think the
by shiandow 3y ago
I'm starting to be increasingly certain that making a new (sub)language to express and solve your problems is the highest form of programming.
You'd think the ability to define custom syntax would be the most important, but paradoxically lisp makes it a lot easier simply because there is no syntax.
- netbioserror 3y agoExactly this. In addition, I've found that in almost all Lisps, macros are a niche feature that are not needed to solve many problems; however, because the actual invocation of macros and normal functions is the same S-expression form, almost all Lisp programs end up as some sort of DSL. Especially when you have arbitrary heterogeneous data structures like Clojure. Instead of dealing with chains of single assignments as in older C-like languages, you've got a bunch of compact calls fully in-context.
- fiddlerwoaroof 3y agoSo, “there is no syntax” is one of those things that isn’t really true of most lisps: it’s more true to say they have programmable syntax and the default syntax is minimal.
- jll29 3y agoSure, Structure and Interpretation of Computer Programs (SICP) calls that "meta-linguistic abstraction", and there are many complex systems that contain a Domain Specific Language (DSL), or a complete programming language (e.g. E(macs)LISP). That is not much different from a mathematician that creates a new notation like "∞" or "∫_d_" because existing notation is capable but not convenient (to cluttered, shorthand needed to focus on domain concepts) for what needs to be done.