PHP 6 picks up GOTO and COMEFROM

I read about these two new PHP 6 language changes on SitePoint Blogs today and left scratching my head.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I'm wondering if someone has figured out... to implement a monadic version of comefrom in Haskell. Could be useful don't you think?

I believe it's already April

I believe it's already April 1st in some parts of the world.

This blog

Hey, this blog runs on PHP, ya know. Some respect, please! ;-)


I thought it would run on one of the most exotic OCaml dialects ever invented by Paul Snively or the secret, mythic super-hacker collective that is simply called "Paul" that is told to work with a pre-release or Arc?

I'm a little disappointed :-(

Close enough

The site runs on Drupal, which was originally the brainchild of Dries Buytaert, currently a CS PhD student at Ghent. His publications include "A selective runtime compiler for the Wonka Virtual Machine", which based on the title alone, is a sufficient connection to LtU's subject matter to satisfy any critic. (Wonka is "a cleanroom Java VM implementation ... with its own real-time OS (called Oswald) that provides a complete solution for embedded devices".)

PHP? Not for long.

Ook? Ook!

I'm glad to see they at least considered Haskell before settling on Ook!!

I know it's April 1st, but...

Nonetheless, this fits right into my impression of PHP as the pinnacle of Great Language Design.

Unlike other programming languages, PHP wasn't born a lowly general purpose lifeform, it *evolved* from a C library to help write CGI apps into a language and lastly into a language that's being adopted for stuff like general shell scripting and even GUI applications.

This shows that PHP is totally at home in the real world, that its design is the best ever, that PHP embraces - unlike other languages - the nature of connectivity and the web, and now of course innovative language constructs that help great programming in the One and True PHP style that is - well, the general madness that is PHP.

I was actually hoping for...

I was hoping for embedded Assembler myself.

April 1st and all, I

April 1st and all, I know.

However, nothing wrong with GOTO if your language lacks proper error management and/or flow control. GOTO is the closest thing to exceptions when you don't have them.

Of course you can argue that a proper language has better flow control, but you can't deny the simplicity of GOTO. Hell, at the lowest level your CPU is just a big GOTO machine anyway.

mmm, Intercal here we come

mmm, Intercal here we come

It's called the Observer Pattern.

..and I wish it was just an April Fools joke.

I think anyone who has dealt with code heavily infested with the Observer Pattern soon realises that it is merely an OO implementation of the "COMEFROM" statement.

In the same way the Singleton pattern is merely OO lipstick on the "global variable" swine.

COMEFROM -- the ultimate call/cc

It's high time that COMEFROM received more attention from the PLT community. In this single language construct we see the essence of both AOP and multi-threading.

When will Donald Woods and James Lyon -- INTERCAL's creators -- receive the recognition they deserve? Lest anyone doubt their foresight, try substituting INTERCAL with XML in the following quote:

INTERCAL's main advantage over other programming languages is its strict simplicity. It has few capabilities ... [and] is an exceedingly easy language to learn, [so] one might expect [that] it would be a good language for initiating novice programmers. Perhaps surprising, than, is the fact that it would be more likely to initiate a novice into a search for another line of work. As it turns out, INTERCAL is more useful (which isn't saying much) as a challenge to professional programmers.

I rest my case.


I never could figure out how to get dynamic dispatch in the language, but I put together an INTERCAL Cheat Sheet.

(though such things probably go against the whole spirit of the language). :-)