News for hackers. Stuff that matters.
Re:Japanese Programming Syntax by probablyrobots on Wednesday April 20, 2011 @10:03AM (#2466614)
the conditional syntax he describes does exist in many mainstream programming languages

(x==y) ? a : b

Re:Japanese Programming Syntax by masklinn on Wednesday April 20, 2011 @10:34AM (#2466742)
No. You can't put statements in this, only expressions. It's a limited special case instead of a generic tool (and putting a sequence of conditionals and actions is not going to look good, though I'm sure you can coerce them into it using the "," operator, as long as you don't need to have an iteration as well).

There are languages which have pretty much exactly what he describes (Smalltalk for instance), but "many mainstream languages" don't.

Re:Japanese Programming Syntax by peti on Wednesday April 20, 2011 @10:33AM (#2466736)
Moreover, using an arrow operator, the OP almost wrote a Prolog expression:

  ( X==Y -> A ; B)