I am also interested by this subject.
If you want static types, why not use ML or Haskell directly, instead of trying to graft types onto Scheme?
https://buttondown.email/hillelwayne/archive/a-totally-polished-and-not-at-all-half-baked-take/
I'd be interested if anyone has any details about the type system in
Stalin, or any other attempts of planting static types in Scheme.
Amirouche Boubekki wrote:
I am also interested by this subject.I have once started to write some Hindley-Milner type inference code
for Scheme, based on EOPL I think. It contained inference rules for
most R4RS procedures, but I lost interest before finishing the program.
The greatest to-do is probably recursive types (i.e., letrec, named let).
It could already do things like
(sig '(define (length x)
(if (null? x)
0
(+ 1 (length (cdr x))))))
list int)
If anyone is interested, I could probably dig up the code and put
it on my homepage or post it here.
https://buttondown.email/hillelwayne/archive/a-totally-polished-and-not-at-all-half-baked-take/
This is similar to Chris Smith's very good article "What To Know Before Debating Type Systems":
https://cdsmith.wordpress.com/2011/01/09/an-old-article-i-wrote/
I'd be interested if anyone has any details about the type system in Stalin, or any other attempts of planting static types in Scheme.
I had thought Stalin (like many Lisp compilers) used types for
optimization (unboxing, specialization, etc.) but not so much for error checking.
There is typed Racket as you mentioned, plus typed Clojure;
and moving further afield, the Erlang Dialyzer, Python 3's type
annotations used with the Mypy checker, and something similar that's
recently appeared for Ruby.
I've used Mypy and Dialyzer and found them helpful but impeded by the underlying language that prevented them from going further. I'd expect
the soft type systems for Racket and Clojure would be about the same
way.
If you want static types, why not use ML or Haskell directly, instead of trying to graft types onto Scheme? See also, "Why calculating is better
than scheming", about Miranda, which was a forerunner of Haskell:
https://www.cs.kent.ac.uk/people/staff/dat/miranda/wadler87.pdf
Doesn't Kawa Scheme have some kind of type declarations?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 45:39:04 |
Calls: | 6,648 |
Files: | 12,197 |
Messages: | 5,329,775 |