Announcement

Collapse
No announcement yet.

GHC 8.0.1 Haskell Compiler Released

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    Originally posted by uid313 View Post
    I looked into Haskell but it has a horrible syntax.
    I also looked into F# and it looks pretty bad too.

    Is there any nice functional language?
    Try Arc.

    Comment


    • #12
      Originally posted by hagda View Post

      Hard to tell without knowing what you dislike about F#/Haskell syntax.
      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.

      Comment


      • #13
        Originally posted by ormaaj View Post
        Also I hate significant whitespace. Haskell's indenting rules are painful to learn.
        With the right editor/plugins you don't need to learn them, at all.
        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


        • #14
          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.
          To me the type statement is about as clear of a signaled intent as you can get.
          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


          • #15
            Originally posted by uid313 View Post
            I looked into Haskell but it has a horrible syntax.
            The best thing about Haskell is its beautiful, clean 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

            Working...
            X