4 ms·
Let’s assume Typed Racket’s system is perfect (others have already established it isn’t). There are still things a bolt-on type system can’t do. It can’t be use
by moomin 9y ago
Let’s assume Typed Racket’s system is perfect (others have already established it isn’t). There are still things a bolt-on type system can’t do. It can’t be used to compile more efficient code (which GHC does all the time) and you can’t get any more polymorphism than the language already offers, so forget typeclasses, return type polymorphism and usable monads.
- shakna 9y agoTyped Racket does offer more efficient byte-code in a lot of situations, particularly if it isn't interacting with untyped Racket, or another racketlang. Typed Racket offers parametric polymorphism, the Typed Racket guide shows how to implement Haskell's Maybe type as their first example. It still handles lexical scope and variable arity, as well. Lastly, Typed Racket is hardly a "bolt-on" type system. It's a language with it's own parser and lexer. It just happens to be capable of interacting with every language also running on the Racket backend. That's like calling GHC a bolt-on, because it's part of GCC.
- lomnakkus 9y ago> That's like calling GHC a bolt-on, because it's part of GCC. Eh? AFAIK, GHC has absolutely nothing to do with GCC.
- shakna 9y agoBadly worded, but GHC has GCC as a backend, the Windows dist uses it.
- lomnakkus 9y agoI got my information from [1] and it only mentions gcc for the backend meant for porting, so I just kind of assumed that it would be using the native backend for all platforms. (Admittedly [1] is perhaps a bit out of date, thought.) Certainly, it was just nitpicking, regardless. [1] https://downloads.haskell.org/~ghc/7.8.3/docs/html/users_guide/code-generators.html https://downloads.haskell.org/~ghc/7.8.3/docs/html/users_gui...
- baldfat 9y agoIf you read this document on Racket optimizers you will see that they have actually put a lot of thought and tools for exactly your concerns. The collective Lisp academic might behind Racket is big but there is also a lot of general computing work getting added to Racket for years. I certainly wouldn't say it is a "bolt-on type system" Racket Typed is defined as > Typed Racket is Racket’s gradually-typed sister language which allows the incremental addition of statically-checked type annotations. https://docs.racket-lang.org/ts-guide/index.html https://docs.racket-lang.org/ts-guide/index.html > This package provides optimization coaching support to help you get the most of the Racket and Typed Racket optimizers. https://docs.racket-lang.org/optimization-coach/index.html https://docs.racket-lang.org/optimization-coach/index.html