Loading ...
Sorry, an error occurred while loading the content.

Joke: Haskell's Terminology vs. C++'s

Expand Messages
  • Shlomi Fish
    Haskell contains a class construct which is exactly the same as a template in C++. I.e: is a unified API across several data types. Now, O Haskell which is
    Message 1 of 1 , Feb 4, 2002
    • 0 Attachment
      Haskell contains a "class" construct which is exactly the same as a
      template in C++. I.e: is a unified API across several data types.

      Now, O'Haskell which is the object-oriented extension to Haskell, had to
      use the keyword "struct" to define an objects' class, becuase "class" was
      already taken. Now, it also has the keyword "template", which seems to
      instantize an object and initialize it. They could not use the keyword
      "instance" because it is used to implement a "class" for a certain type...

      So here is the Haskellish dictionary for C++'ers:

      class ==> template
      instance ==> template binding
      struct ==> class
      template ==> object or class instance.

      If you are confused, you should be.

      Regards,

      Shlomi Fish

      There is no IGLU Cabal! Or, from Hebrew: "The Bouquet of Izz-know is an
      Capacitor Igloo."



      ----------------------------------------------------------------------
      Shlomi Fish shlomif@...
      Home Page: http://t2.technion.ac.il/~shlomif/
      Home E-mail: shlomif@...

      "Let's suppose you have a table with 2^n cups..."
      "Wait a second - is n a natural number?"
    Your message has been successfully submitted and would be delivered to recipients shortly.