Hacker News new | past | comments | ask | show | jobs | submit login

> Javascript is actually untyped, not weakly typed (untyped means no type declarations, not that it has no types) and I don't see that as a problem.

That's not what any of that means.

"No type declarations" only means just that. Haskell has no obligatory type declarations due to global type inference and nobody is calling Haskell untyped.

Untyped means untyped. None of the APIs or code are built around types, structurally or by name. It's just a one big union type of possible JavaScript values all over the place even if that's not what you meant when you wrote the function.

Being interpreted has nothing to do with type-checking. Haskell's REPL is an interpreter. Using a library (Hint) you can eval arbitrary Haskell from strings in a type-safe manner.

You can even parse arbitrary data from strings in a type-safe manner without resorting to an interpreter:

    -- throws error
    read "blah" :: Int 

    -- returns 1
    read "1" :: Int
via the magical joy that is Haskell typeclasses. Trivial but still very nice stuff.

Type-checking requires statically derivable information. You won't get any of the niceness unless you design your language around it.

I don't care about syntax either. It don't think it really matters and it takes all of an evening to get used to syntax from any language.

Yeah, `this` is freakin' ridiculous.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: