News for hackers. Stuff that matters.
Re:Things I Was Wrong About: Types by TeMPOraL on Sunday September 27, 2020 @06:45AM (#24605693)
Same here! I've started with C++ and Java, learned to hate excessive typing, went through a long period of dynamic typing, and now I'm at the point you and the the author are.

I still code a lot of Common Lisp on the side, but my Lisp code now looks entirely different than it looked just 3 years ago. The language standard does support optional typing declarations, and there's an implementation (SBCL) that makes use of it to both optimize code and provide some static typechecking at compile time (with type inference). So my Lisp code now is exploiting this, and is littered with type declarations.

However, the CL type system is very much lacking compared to Rust or Haskell. I'm hoping one day someone will make a statically, strongly typed Lisp that still doesn't sacrifice its flexibility and expressive power. I'd jump to that in an instant.

Re:Things I Was Wrong About: Types by gryfft on Sunday September 27, 2020 @10:06AM (#24606690)
My experience with strong types is limited-- I'd done the thing of learning some C, doing professional stuff in Ruby for several years and then discovering the ridiculous power strong types can have and doing some professional stuff in Go.

Typed Racket [1] was really a revelation to me in that regard. I'd be curious how developers with more strongly-typed language experience feel about it.

[1] https://docs.racket-lang.org/ts-reference/index.html

Re:Things I Was Wrong About: Types by stevelosh on Sunday September 27, 2020 @11:32AM (#24607380)
> However, the CL type system is very much lacking compared to Rust or Haskell. I'm hoping one day someone will make a statically, strongly typed Lisp that still doesn't sacrifice its flexibility and expressive power. I'd jump to that in an instant.

https://github.com/stylewarning/coalton looks promising, and stylewarning has recently said he's still working on it.

Re:Things I Was Wrong About: Types by reirob on Monday September 28, 2020 @05:28AM (#24614725)
> I'm hoping one day someone will make a statically, strongly typed Lisp that still doesn't sacrifice its flexibility and expressive power. I'd jump to that in an instant.

This part inspired me to look up the wiki page "Haskell Lisp [1], because I somehow remembered that some people were trying to make a Haskell that could be written in Lisp. But this page reveals even more interesting efforts:

> Shentong - The Shen programming language is a Lisp that offers pattern matching, lambda calculus consistency, macros, optional lazy evaluation, static type checking, one of the most powerful systems for typing in functional programming, portability over many languages, an integrated fully functional Prolog, and an inbuilt compiler-compiler. Shentong is an implementation of Shen written in Haskell.

> Liskell - From the ILC 2007 paper: "Liskell uses an extremely minimalistic parse tree and shifts syntactic classification of parse tree parts to a later compiler stage to give parse tree transformers the opportunity to rewrite the parse trees being compiled. These transformers can be user supplied and loaded dynamically into the compiler to extend the language." Has not received attention for a while, though the author has stated that he continues to think about it and has future plans for it.

But this page does not list everything and there is Hackett [2], which introduces itself with "Hackett is an attempt to implement a Haskell-like language with support for Racket’s macro system, built using the techniques described in the paper Type Systems as Macros. It is currently extremely work-in-progress." - though it seems that it didn't change since two years.

And finally there is Axel [3] - which introduces itself with "Haskell's semantics, plus Lisp's macros. Meet Axel: a purely functional, extensible, and powerful programming language."

Disclaimer: I never learned any Lisp, went from C/Java/JavaScript/Bash straight to Haskell and am a Haskell beginner for lifetime. Though I love the language and the fact that I will be learning it and surprised by it for the rest of my life.

[1] https://wiki.haskell.org/Haskell_Lisp [2] https://github.com/lexi-lambda/hackett [3] https://axellang.github.io/

Re:Things I Was Wrong About: Types by cconroy on Sunday September 27, 2020 @09:16AM (#24606393)
"statically, strongly typed Lisp that still doesn't sacrifice its flexibility and expressive power"

SML

Re:Things I Was Wrong About: Types by TeMPOraL on Sunday September 27, 2020 @10:37AM (#24606949)
... with sane (i.e. s-expression based) syntax.

:).

But I'll check out SML. That's Standard ML, right?

Re:Things I Was Wrong About: Types by masklinn on Sunday September 27, 2020 @02:03PM (#24608686)
> ... with sane (i.e. s-expression based) syntax.

You can just enclose all your function calls in parens :D

Also you probably want to check out OCaml rather than SML, I don't know that SML has much of a presence… anywhere really.

Re:Things I Was Wrong About: Types by cconroy on Sunday September 27, 2020 @11:30AM (#24607362)
Yeah.

ML syntax is very pleasant, and roughly, sexprs w/o all the punctuation noise.

I don't believe it has a macro capability like lisps though, but you gain a sophisticated type helper.

Definitely worth looking into!

Re:Things I Was Wrong About: Types by Ar-Curunir on Sunday September 27, 2020 @11:05AM (#24607157)
FWIW, SML is an old research-focused language that was the progenitor of Haskell and Ocaml and Rust, and not something to program in :)
Re:Things I Was Wrong About: Types by tasogare on Sunday September 27, 2020 @12:00PM (#24607627)
F# is a modern derivative usable in the real world.
Re:Things I Was Wrong About: Types by andrenth on Sunday September 27, 2020 @01:15PM (#24608200)
You might be interested in Carp: https://github.com/carp-lang/Carp