4 ms·
Lisp is far and away the best of the nonreadable programming languages.
by aj7 2y ago
Lisp is far and away the best of the nonreadable programming languages.
- Zambyte 2y agoIt's all the way up at the best readable ones instead :)
- marcosdumay 2y agoIt takes getting used to it, just like every other programming language syntax. If you are comparing it to the ones you are used to, of course you'll find it harder. (IMO, I don't like the Lisp syntax, but it's really not "non-readable".)
- 7373737373 2y agoIt is hard to read though. As a beginner or someone unfamiliar with a new codebase you never know whether you are recursing into a special form or not. If you are, the semantics and order in which you ought to read and understand and further recurse into the argument list changes completely. How other programming languages limit the depth of this recursion and the variation/complexity of a code block, by splitting the semantics into a limited set of reusable syntactic constructs is very powerful. It is sad that most aren't homoiconic though.
- iLemming 2y ago> It is hard to read though. What isn't? Java or C# with deep hierarchies of nested classes and tons of boilerplate, extensive use of interfaces or overuse of exception checking? Python with its magic methods and decorators and misindentation? Javascript with the callback hell, inconsistent type coersion and sometimes tricky async code? Ruby with its weird metaprogramming and monkey patching? C with the pointers mental acrobatics and pre-processor macros? Perl with weird default vars like $_ and tons of regexps? Haskell with its monadic structures and heavy use of weird symbols and operators? PHP with the crapload of its historical baggage, global vars and inconsistent, non-standardized function naming? Any programming language can be considered hard to read, quirky, slow, inconsistent, or lacking some feature. Everyone knows there are only three God-given, bullet-proof, guaranteed ways to write robust, fast, consistent, bug-free and scalable software. Three... Humankind has yet to discover those.
- deleted 2y ago[deleted]
- iLemming 2y agoPfff... The Lisp syntax is one of the simplest, comprehensible, readable, no-BS sugar things. People with shallow experience often say it looks weird, but with some hands-on experience, you soon appreciate its elegance and power. The consistent, minimalist syntax becomes second nature and reveals its true beauty and functionality. You can easily read Lisp code off your phone screen - it wraps around, but retains the structure. Try that trick with pretty much any non-lispy language - even "the most elegant Python" fails there, face flat. EDN & Transit is far better than JSON - EDN is more flexible and expressive than JSON, making it a superior choice for data serialization. It's also more than two times smaller and cleaner, commas are completely optional. Hiccup is better than JSX & HTML - far more easier, cleaner, shorter and nicer to work with. similarly, s-expressions are better that XML & Yaml; CL's PLISTs and ALISTs & Clojure maps are better than Dicts/Hashes in other languages. Basically, you can leverage the expressiveness and simplicity of Lisp-like syntax to offer structured, readable, and powerful data representations. Add to that the ability to evaluate any given form on the fly through a connected REPL, basically "trying things while you read them," and that changes everything you thought you knew about the readability of code. Those who call Lisp "non-readable" I suppose, in fact, never tried to actually read it. Of course, if you never learn a language, it would remain incomprehensible.
- vsuperpower2020 2y ago"Pfff..."? You're getting a little too defensive over someone not liking your language. You're just asserting that the language is easy to read and saying that anyone who disagrees just hasn't read it. This is some sad fanboy behavior that I don't like to see.
- iLemming 2y agoI've got your attention though, haven't I? :) Defensive? No. I don't think Lisp needs defending. Lisp is an idea. Good ideas need no defending. The invention of Lisp is one of the greatest events in the recent history of symbolic communication. It can be put in the same category as cave drawings, cuneiform, Egyptian hieroglyphs, and mathematical notation in the sense that they all represent systems of symbolic communication. My "Pfff..." really comes from not understanding why people would say things like "Lisp is hard to read" when, in truth, it's probably the best tool we humans have for its designated purpose. Lisp emphasizes simplicity and uniformity, which can enhance readability and ease of understanding programs. With a big caveat, though, Lisp's readability improves with practice and familiarity. Many people find Lisp structures to be clear and expressive for symbolic manipulation and functional programming tasks. Okay, I mean I get it. Let's say I can, for example, look inside "Principia Mathematica" and completely find it unreadable. Yeah, I would. But wouldn't it be weird of me to go to a forum for mathematics and tell them that their math is unreadable? They'd probably decide that I'm trolling.