Originally posted by uid313
View Post
Announcement
Collapse
No announcement yet.
GHC 8.0.1 Haskell Compiler Released
Collapse
X
-
Originally posted by hagda View Post
Hard to tell without knowing what you dislike about F#/Haskell syntax.
Example, the return value is just the last parameter, so from a syntax point of view there is no distinction of function parameters and a function return value, its just an implicit assumption that the last word is the return value.
Also the parameters are not comma-separated and located within parenthesis.
Comment
-
Originally posted by ormaaj View PostAlso I hate significant whitespace. Haskell's indenting rules are painful to learn.
Personally, I prefer those forced indent rules nowadays (used to be different for me, as well). They make sure I can't slack off and actually have to follow a certain coding style.
Comment
-
Originally posted by uid313 View Post
It was just words after words without any characters to signal intent.
Example, the return value is just the last parameter, so from a syntax point of view there is no distinction of function parameters and a function return value, its just an implicit assumption that the last word is the return value.
Also the parameters are not comma-separated and located within parenthesis.
Given that haskell is functional there's not really a return value, rather more of just a value. (Or since it's lazy the promise to come up with a value later)
Additionall partial application of a function is a valid value, the expresion `(3 + )` is just as valid as `sqrt` or `"Hello World!"` or `map (3 +) $ take 5 [1 ..]`.
The syntax was designed to let you do a lot of odd and beautiful things without a lot of cruft. Point is the syntax is odd for a reason, and that reason is not just to the sake of oddness.
Comment
-
Originally posted by uid313 View PostI looked into Haskell but it has a horrible syntax.
If you are used to C# or Java, I would recommend Scala as a good functional learner language. Although, as the creator of Scala says, "Scala is a gateway drug to Haskell".
Comment
Comment