Reply to comment

Other syntax things

Something else I noticed but didn't think to mention, not only are tuples more terse in Haskell (and I'd say most "modern" languages), but so are arrays:

x = [1, 2, 3]

It's got everything it needs to figure out what the variable type is and to initialize the array. Definitely handy. C/C++ have their own too:

int x[] = {1, 2, 3};

...and I'm sure that the automatic type inference with C++0x will improve that further.

I guess this is on my mind, since I just added the Haskell syntax to Minnow as well, so you can now do something like this as of the latest SVN:

x : var = [1, 2, 3]

Now umpteen-1 more functions/operators to go :)

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote>
  • Lines and paragraphs break automatically.
  • You may post PHP code. You should include <?php ?> tags.
  • Web page addresses and e-mail addresses turn into links automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <cpp>. The supported tag styles are: <foo>, [foo]. PHP source code can also be enclosed in <?php ... ?> or <% ... %>.
  • Images can be added to this post.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
7 + 3 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.