(no title)
zaro | 5 years ago
The unless example is a good one. So while you can trivially implement 'unless' in lisp, most probably in a large code base, you'll en up with 'unless', 'if-not' and depending on how creative others are probably also 'negat-if'.
Jtsummers|5 years ago
Reelin|5 years ago
Certainly the design of a language should facilitate and even actively encourage writing good code. Attempting to solve systemic organizational or educational issues with it is probably counterproductive though.
andreareina|5 years ago
The benefit is being able to extend the language. Context managers in Lisp are just macros. Clojure's spec and async are macros.
For sure, the joke about blowing your whole leg off (as opposed to just your foot) applies, but it's the same for concurrency, distributed systems, cryptography, etc. The answer isn't to ban it, it's to exercise more care in the construction of these abstractions so that mere mortals can use them safely.
Fishysoup|5 years ago
This makes macro wizardry easier to spot, but restricts how "plastic" the language is somewhat.
https://docs.julialang.org/en/v1/manual/metaprogramming/
lawl|5 years ago
imo this is not only a problem in a singular large code base, but also libraries.
I know not everyone likes Go, but I've noticed that i find it super easy to dig into some open source dependency and navigate it, because in some ways Go is the exact opposite of lisp. In terms of the language not allowing a lot of flexibility at least.
I never found navigating foreign java code bases that easy because this project uses spring for dependency injection, that one does some other class loader magic etc, streams, no streams etc. pp.
That said, I do think LISP is cool, but I think it ends up being a right tool for the job kind of thing. I could imagine LISP being nice for things like game engine scripting etc.
Viliam1234|5 years ago
In Clojure, "if-not" is part of clojure.core (the equivalent of java.lang in Java), so a decent programmer would almost certainly be familiar with it; and if not, it would be pointed out at a code review.
People use Lisp for a while, so the obvious simple ideas were probably already noticed and implemented.
With less frequent things, implementing the same thing twice under two different names is a problem that happens regardless of the language.
Fishysoup|5 years ago
unknown|5 years ago
[deleted]