News for hackers. Stuff that matters.
Re:Why Perl 6 is different by jimbokun on Tuesday April 20, 2010 @10:43AM (#1279508)
I'm pretty sure the C example will not compile with a C compiler.

Which may seem like a nit, but the reason is because the semantics of Haskell and C are extremely different. Furthermore, the semantics strongly influence the design of the language. In Haskell, whitespace denotes function application, because the most common thing to do in Haskell is to apply a function. C has semicolon delimited statements, because imperatively executing statements one after the other is a very common thing to do in C programs. In Haskell, you cannot guarantee the exact order in which things happen without going to great lengths (monads, etc.).

In short, I don't think offering a skinnable syntax buys much, and is likely to just generate greater confusion.

Re:Why Perl 6 is different by loup-vaillant on Tuesday April 20, 2010 @04:05PM (#1280451)
Of course it won't compile with a C compiler. It wasn't meant to. I just invented a C-like syntax for pattern matching. I had to, so it could be translated to the machine version, which will be compiled. (As you may have guessed such a compiler doesn't exist —yet.)

On the benefits of skinnable syntax: look at C++, Java, and Javascript. They have two things in common: their popularity, and their syntax. Coincidence? I think not. By stealing the syntax of C, they build on it's original success.

I painfully know that C syntax isn't suited to functional code with gazillions of nested function calls. However, this is a known syntax. It makes learning far easier (or at least looks that way, so people are actually willing to try).

Re:Why Perl 6 is different by eru on Tuesday April 20, 2010 @11:05AM (#1279580)
> C has semicolon delimited statements, because imperatively executing statements one after the other is a very common thing to do in C programs.

Actually that would be an argument for making newlines delimit statements, like in, say, Python. Instead of requiring extra work by the programmer.

Re:Why Perl 6 is different by pyre on Tuesday April 20, 2010 @08:44PM (#1281044)
Why? "imperatively executing statements one after the other" does not imply that they have to be on different lines.
Re:Why Perl 6 is different by loup-vaillant on Wednesday April 21, 2010 @03:05AM (#1281559)
They don't have to, but they are, most of the time. Knowing that, "newline as delimiter" yields the lightest syntax.
Re:Why Perl 6 is different by eru on Wednesday April 21, 2010 @10:58AM (#1282332)
Plus optional semicolons to put some on the same line as in Python.