Tuesday, April 11, 2006

Matlab GOTO joke

As an exercise in not taking oneself too seriously, I will admit that, probably for the first time in at least 25 years, I fell for an April Fools Day joke.

I wrote the following piece, and only as I wrote the last line, I realized that this proposal wasn't real. Nice one Loren.



Matlab developer Loren Shure writes on her blog this week about a proposed spec for a adding the GOTO command to Matlab. Now I was trained to believe that GOTO is a source of pure evil in programming. The core Matlab system design has never been very "modern", showing too clearly its FORTRAN background, but even so, this seems like an unnecessary backward step.

Loren writes that "The problem with GOTOs is not the GOTO itself, but with the label." but then goes on to describe a bizarre spec that includes fractional line numbers, complex line numbers and random GOTO targets. This would be guaranteed to make "spaghetti code".

She wrote this on April 1, and it looks more like an April fools joke than a serious proposal.

3 comments:

Harald Hanche-Olsen said...

Heh. Of course, a modern language should use not GOTO, but COME FROM (of INTERCAL fame).

BeauPaisley said...

"Spaghetti code" isn't created by languages, it's created by programmers. In O-Matrix we include a goto statement, (http://www.omatrix.com/manual/goto.htm) because the majority of our end users wanted it. When properly used this can provide clean solutions. We commend The MathWorks consideration of finally including this in Matlab.

uno said...

article that you created is very interesting, by reading this article I have a reference to write a new post on my blog