3 ms·
Is it really Scheme if it's statically typed? I could see type hints or the like, but > Expressions like '(1 "two" three) will not pass the type checker. All l
by bachmeier 12y ago
Is it really Scheme if it's statically typed? I could see type hints or the like, but
> Expressions like '(1 "two" three) will not pass the type checker. All lists must be monomorphic, i.e., a list of ints, or a list of bools, etc...
seems to me to be such a big change as to mean it's not Scheme.
Don't get me wrong, I love the idea of statically-typed Scheme, and will look carefully at it. I just think it's odd to claim it's Scheme.
- bunderbunder 12y agoIn a way, it really seems more like a dialect of ML with Scheme-like syntax. It's not just the monomorphic lists, it's also the algebraic data types and pattern matching.
- klibertp 12y agoI wonder if something like this would be possible: (list (:myint 1) (:mystring "two") (:mysymbol 'three)) ?
- wtetzner 12y agoIf you want a typed Scheme that you can still write the way you write Scheme, take a look at Typed Racket.
- bachmeier 12y agoI may look at it again. The last time I did so, the documentation was a bit uneven, which is something I've found to be true about Racket more generally (particularly the extensions).
- kazinator 12y agoIf (1 "two" three) doesn't type check, then how do macros work? There must be an exception for the syntax itself. You should be able to write a macro (my-quote (1 "two" three)).