Re:Running Lisp in Production (2020)
by threatofrain on Wednesday February 02, 2022 @01:30AM
(#30174477)
Perhaps it's because of typing. Personally I find that structural insights on code from static analysis to be just as important if not more than local readability. I also generally find that it's the complexity of program strategy that impairs local readability more than syntax or style.
Common Lisp has type declarations and I think on a big code base, I would want to declare most if not all of my function types.
And the types are not just for information: the compilers can and do optimise heavily if you ask for it with `(optimise 3)`! You can get nearly as fast as C.
Re:Running Lisp in Production (2020)
by reikonomusha on Wednesday February 02, 2022 @03:04AM
(#30174977)
Without a library like Coalton, the type system built into Lisp is pretty limited. (It feels pretty similar to C's.) So you can't[1] declare types like "list of foo" or "function that takes any type and returns the same type".
[1] There is something called a SATISFIES type which lets you turn any globally defined predicate function into a type, but I don't find that it's used widely in practice, because the compiler can't reason about it.
Not sure if separating the language from its available libraries is really helpful...
Re:Running Lisp in Production (2020)
by reikonomusha on Wednesday February 02, 2022 @03:22AM
(#30175097)
It is, because libraries like Coalton don't give you an expressive type system "for free", you also have to agree to write your code in a certain way. As such, it's completely reasonable for Lispers to opt out of using such opinionated libraries, and instead using only what's provided by the standard.
If you do use a library like Coalton, then you get a type system pretty close to Haskell's.
Re:Running Lisp in Production (2020)
by threatofrain on Wednesday February 02, 2022 @06:31PM
(#30185829)
Hey, do you use Coalton, and how mainstream would you say it is?
Re:Running Lisp in Production (2020)
by gmfawcett on Wednesday February 02, 2022 @08:10PM
(#30186975)
I'm fairly sure that their company created Coalton:
https://coalton-lang.github.io/20211010-introducing-coalton/
Re:Running Lisp in Production (2020)
by reikonomusha on Thursday February 03, 2022 @03:03AM
(#30189907)
It's pretty new and not yet considered mainstream. But it's under active development and is used for real commercial projects.
Re:Running Lisp in Production (2020)
by reikonomusha on Wednesday February 02, 2022 @01:37AM
(#30174522)
This may help: https://github.com/coalton-lang/coalton
What are your thoughts here?
I’ve found lisps to be my favorite languages to read other people’s code in.