Re:Is Haskell the right language for teaching functional pro...
by gnaritas on Monday October 16, 2017 @01:08PM
(#15484828)
> Javascript doesn't support duck typing. It doesn't support any typing actually: it's dynamically typed.
Dynamically typed doesn't mean untyped; you still have types in JavaScript. Most dynamic languages are strongly typed, not untyped. You're conflating a few unrelated things. JavaScript is duck typed, as virtually all dynamic languages are.
Re:Is Haskell the right language for teaching functional pro...
by palunon on Monday October 16, 2017 @03:29PM
(#15485994)
Dynamic typing isn't lack of typing.
The fact that types cannot be statically checked doesn't mean you don't have any.
Bash only has one type, the string, and is thus statically typed.
Is Bash's type system better than say, Python's ?
Re:Is Haskell the right language for teaching functional pro...
by zwerdlds on Monday October 16, 2017 @12:48PM
(#15484640)
Yes, that was my point.
Re:Is Haskell the right language for teaching functional pro...
by seanmcdirmid on Monday October 16, 2017 @03:24PM
(#15485947)
Dynamic typing is a typing. Also, duck typing is used more in the dynamic sense than the static sense, where in the latter it is instead called structural typing.
If Javascript can inspire respect for type systems, it's by making you realize that not having type annotations leads to terrible, unmaintainable code.