4 ms·
Basically any modern, turing-complete, and non-esoteric (eg. Brainfuck) language fulfills the "at least adequately" part. So it comes down largely to preference
by Nadya 5y ago
Basically any modern, turing-complete, and non-esoteric (eg. Brainfuck) language fulfills the "at least adequately" part. So it comes down largely to preference and style of the language itself. I can't stand C# code or that the language uses Allman style over K&R because I truly find Allman style more difficult to read. I shouldn't - the difference is very minor - and although I work with a C# codebase in my day-to-day work I always struggle parsing the code quickly compared to languages where K&R style won out.
Now "optimally" is an entire can of worms because there are some aspects where you need to make mutually exclusive choices. You can optimize A or B but not A and B for multiple sets of A and B. So you'll end up with multiple languages or multiple flavors of a single language where decisions were made to optimize for varying sets of A and B. A and B can even be simple things like "How easy is it to footgun yourself?". Should you make code that is more boilerplate/difficult to write in order to prevent people from footgunning themselves or do you expect your developers to be more experienced and allow them to write more succinct code but having to be aware of and avoid potential footguns themselves? There are a lot of domain-specific languages for precisely the kinds of trade-offs are made that certain fields want/need. For example, mathematics domain languages tend to be 1-indexed instead of 0-indexed.
By the way that language is LISP.
[0] Just in case anyone is unfamiliar with Allman/K&R styles mentioned you can see examples on Wikipedia: https://en.wikipedia.org/wiki/Indentation_style https://en.wikipedia.org/wiki/Indentation_style