4 ms·
This is a good article and I think it hits the nail on the head. There is one point I don't agree with though: > Syntactic uniformity also means there is a lot
by paldepind2 3y ago
This is a good article and I think it hits the nail on the head. There is one point I don't agree with though:
> Syntactic uniformity also means there is a lot less room for syntax bikeshedding. Really the only thing you can bikeshed is the naming convention for identifiers, and how S-expressions should be indented.
This might be true in theory, but in practice I find to be effectively false. Lisp makes is very easy to add your own macros that implement DSLs with custom "syntax". Common Lisp for instance has bunch of these build in, for instance for iterating over lists. While this is technically not syntax in the traditional sense that the parser is aware of it, it has the same characteristics for a user. You need to learn the "syntax" that the macros implement and _that_ syntax you can certainly bikeshed about.
- WorldMaker 3y agoYou can see that in even ancient Lisp discussions. The article shows a macro that transforms to a Common Lisp-style LOOP, but LOOP is often criticized as having too much of a DSL syntax and there's plenty of old debates on if it is better to use things like REDUCE or other predecessors of LOOP instead of learning the complexities of LOOP. (On the other hand, LOOP is very powerful, and its mini-query language can relatively succinctly describe a lot of usefully optimized loops.)
- Jtsummers 3y agoThe LOOP facility is also often more efficient than stringing together map, reduce, and other functions. Unless you use something like SERIES (or a similar package) which can perform stream fusion for efficiency, but that's not the norm (I highly recommend exploring it though if you want to use the map/reduce style and want efficient results).