Re:Is Haskell the right language for teaching functional pro...
by mpfundstein on Monday October 16, 2017 @11:02AM
(#15483660)
1000000 times this!
I learned FP (Functors, Monads, Applicatives etc. )through Javascript (Dr. Booleans adequate guide) and it was an eye-opener.
Still no love for Haskell!
[ Parent
| on HN ]
Re:Is Haskell the right language for teaching functional pro...
by fakedrake on Monday October 16, 2017 @11:25AM
(#15483845)
Typeclasses and parametric types are there to leverage the typesystem. It's hard to see how you can benefit from these abstractions if all you have is ducktyping.
Re:Is Haskell the right language for teaching functional pro...
by zwerdlds on Monday October 16, 2017 @11:38AM
(#15483952)
Not a genuine answer, but JavaScript has a great ability to inspire respect for type systems, due to that duck typing.
I suppose the GP enforced it manually?
Re:Is Haskell the right language for teaching functional pro...
by hota_mazi on Monday October 16, 2017 @12:30PM
(#15484429)
Javascript doesn't support duck typing. It doesn't support any typing actually: it's dynamically typed.
If Javascript can inspire respect for type systems, it's by making you realize that not having type annotations leads to terrible, unmaintainable code.
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.