I've been away again for a few days.. Installed a new kernel which didn't work so good, locked up my machine when I started XMMS, etc. I was using 2.6.7-mm6. But now I'm back with a new working kernel.
So I have catched up a bit on mail and I saw this lengthy thread about goto.
Sara wrote a patch for PHP to add goto to it, which is great, exactly what I need. But noooooo!
Some people don't think we need it (and vetoed it if I understand it correctly) even though lots people voted for it. They say there are other ways to do what goto does or that it will allow novice programmers to shoot themself in the foot. Sure there are other ways to do goto's, lots and lots of annoying, messy, hairy, butt-ugly loops!
Goto would be a good thing to have.
(1) I wrote a parser a few months ago which rewrites some code to a better format that is better suited for the final parsing.
(2) Then I had to add some features to it that it was missing, but that wasn't that simple at all. This was probably the first time I cursed PHP for not having goto. I now had to rewrite it all because it was too messy to add the features I needed with all loops and recursive functions to emulate goto. So I rewrote it. It worked really great.
(3) Then I realized I needed yet another feature which wasn't compitable with the old way I was parsing the files through the loops, so once again I had to rewrite the parser. At this time I started to get a bit pissed off at the lack of goto, but I could handle it. It only took me 4 hours to rewrite it with the added functionality.
(4) A few days ago I yet again found a feature I need which again is incompitable with the current loop structure in one way or another, or I might have to add yet another nested loop, I don't know. But it's getting extremly annoying with all these loops to emulate goto.
Now you might ask yourself why the hell I rewrite it everytime or you think for yourself that my code must suck or that it isn't commented enough or something. It is. The thing is that it's extremly hard to follow the code path between the loops and recursions. The code is in execute-only mode now and it was write-only when I wrote it.
If we had goto it would have saved me atleast 12 hours of coding.