On 12/17/2014 09:01 AM, Hongwei Xi wrote:
> I thought you would say Scheme/Racket(typed Scheme) :)
>
> I myself once tried to add types to scheme (around 2002) but gave up
> quickly.
>
> I took a quick tour over typed-lua. Of course, a BIG concern is that this
> kind of
> soft/gradual typing could lead to many false alarms or let type-errors slip
> through.
> This is not unlike the warnings issued by clang as we saw today.
>
> In any case, one needs to use it for a while in order to get a sense
> whether it really
> works. Or ask Scheme/Racket users?
>
I tried typed Racket for a while. It is nothing short of dreadful, I
think it only exist for the sole purpose of being able to say ‘hey, we
have static types too so you can't say XYZ is better due to having
them!’. It's constraining to use, annotations need to be scattered
everywhere, ton of stuff has fairly silly types just to accommodate for
LISPiness of the base language. It's not nice to use at all.
I agree with Hongwei Xi in that I personally don't know any typed-X
that's more successful than just X: you get all the faults of X with all
the faults of a typing system that was just tacked on as an after-thought.
Personally I recommend using a language designed around typing to begin
with such as Haskell. If you're doing safety critical, typed-X seems
like a pretty terrible choice: maybe better than just X but certainly
not nicer to write in.
--
Mateusz K.