7 ms·
It needs to be repeated over and over that Common Lisp is a pretty damn poor choice for this blogpost's title, even though the first part of its name kinda-sort
by phoe-krk 5y ago
It needs to be repeated over and over that Common Lisp is a pretty damn poor choice for this blogpost's title, even though the first part of its name kinda-sorta fits into the "tragedy of the commons" idea.
CL honestly isn't a large language by modern standards. The Common Lisp standard library is tiny compared to modern C++, Java, Python, Ruby, Rust, Haskell, APL, or whatever other mainstream language one is working with nowadays. CL might have been "batteries-included" in 1994, when it was standardized, but the idea of "batteries" that a language can and "should" include has been expanded hundreds of times since then.
- smackeyacky 5y agoSmalltalk, Lisp, Forth and retro computing are just easy front page HN submissions. I understand why people might get nostalgic for simpler times and simpler computers, I'm partial to the rose coloured glasses view of the past myself. Its been interesting using C# for the last 15 years through that perspective. Microsoft seem intent on folding every cool language feature from every programming language into .NET and it does feel overwhelming, but in the end most experienced programmers have a style so we naturally settle on a subset of language features until we need something new. I really wish somebody had implemented the async patterns in mainstream languages in the 1990s for example. I really don't think nostalgia for simpler times is useful for solving todays problems, I much prefer C# to Smalltalk or lisp for getting stuff done today.
- CraigJPerry 5y agoIt’s hard to argue with c# as a pragmatic choice today: The language itself has adopted just about everything interesting from contemporary languages, from pattern matching to top level statements allowing you to write a hello world or simple scripts that rival python for simplicity. It’s performant, asp.net is at the top of the tech empower benchmarks, c# is only just behind c++ on the compiler benchamrks game leaderboards (although if you actually read the code i question the value of the deceptive impls there, e.g. the regex redux example is just calling a c library rather than using native c# facilities). It’s not as memory efficient as go, by about 5x-10x worse but it’s comparable to java. The clr has a much faster allocator than go (although go developers just pre-allocate up front as an idiomatic optimisation). Since dotnet 5.0 the developer experience is very decent across all platforms. 6.0 with its further enhanced hot reload etc looks even better. It’s cross platform - apple tv apps or apple watch, ios, android, windows, linux, macos, they’re all first class citizens. Whether you want to write 3d games (ubiquity), machine learning, web apps, desktop apps, mobile apps, wasm / blazor, it has 1st class support for them all. And yet, i can’t help but feel common lisp is probably a better language. The developer experience in CL is superior - repl driven development combined with structural editing and easily accessible ast manipulation just put CL (and other lisps) beyond what more static languages can ever hope to offer in terms of developer ergonomics.
- cutler 5y agoAll available with Clojure plus you get the JVM.
- CraigJPerry 5y agoAnd very slightly nicer syntax in clojure, at least to my eye (i'm talking about the vector arg list vs list, and i believe the use of a keyword as a function to pull a value from a map is a clojure-ism too. Both could be added to common lisp though - the vector arg list would be a short reader-macro and my lisp-foo isn't yet strong enough to say how to implement the keyword as a function thing but i'm 100% confident it can be done...)
- adamc 5y agoYou have to like the JVM, though, because all the errors are pretty much straight Java stacktraces -- very little encapsulation of any of that. So Clojure effectively means you have to know Java/JVM and Clojure.
- cutler 5y agoYou only need enough Java to read the stacktraces and that's being worked on by the Clojure core team.
- Zababa 5y ago"It’s performant, asp.net is at the top of the tech empower benchmarks, c# is only just behind c++ on the compiler benchamrks game leaderboards". That part isn't available with Clojure.
- mbrodersen 5y agoClojure is a thin layer on top of Java. So you have to constantly deal with both languages and how to map between them. So much for “simplicity”.
- cutler 5y agoNot so. Most Clojure code doesn't access Java at all. So long as you can read a stacktrace that's all the Java you need.
- Rochus 5y agoThe CL 1994 standard has close to 1400 pages; the C++11 standard had the same size and doubled the number of pages compared to C++03. In comparison to that, the original Oberon language specification in 1990 had less than 20 pages. CL might be "small" in terms of syntax; but the number of constructs to take into account in practice is still large.
- 4ad 5y agoThe CL standard describes the standard library. The language is described in about 40 pages of said standard.
- Rochus 5y agoAlso the C++ standard includes the standard library. The standard library can be considered part of the language. If you include the standard library for C# this adds up to several thousand pages. Lisp like Smalltalk have very little syntax, but this is mostly because constructs which are part of the syntax in bigger languages are constructed in Lisp and Smalltalk on the simple syntax; and you still have to know how to write loops or closures or the like; or if you want OO in Lisp you have to know CLOS, which has many pages.
- kryptiskt 5y agoThe Common Lisp standard library includes most of the control flow constructs, the object system, and ways to bind values. Things that in another language would have been in the core language. You can't learn CL in any meaningful sense without in-depth knowledge of the standard library.
- adrian_b 5y agoIt is true that the CL standard is not much smaller than the C+11 standard but the number of pages on my (officially bought) standard copies are: Common Lisp 1994 (2004 edition): 1153 pages C 1999: 554 pages C++ 1998: 776 pages C++ 2011: 1356 pages C++ 2014: 1375 pages C++ 2017: 1618 pages C++ 2017(2018): 1620 pages In comparison, the reference manual for Ada 1983 had only 336 pages and the Algol 68 report had only 146 pages, these 2 being considered very large languages at their time. It is true, however, that the Algol 68 report would have required a double length to include enough explanations to make it intelligible for everybody.