eh, mental fapping. step above the putrid rules...for great justice!
Name:
Anonymous2006-06-13 2:35
It breaks my mechanical heart that the war over goto is still being fought. goto has a purpose and that is to use it when you can't use something else to do it right.
Testicles.
That is all.
Name:
Anonymous2006-06-13 3:33 (sage)
Like I'm gonna read a pdf. It's not like it's hard to compile your LaTeX to HTML. Unless you're writing it in Word or something, in which case it's unlikely your views on CS are worth considering anyway.
Sometimes GoTo is very useful, but most times you can do it better with a simple while- or for-command and a Break; in it.
Or just put it into an external function. If done correctly, you'll never need any GoTo. Not using it also increases the rate of how fast others (and you in 10 years) can understand the code.
Use it if you like. But don't complain if others can't understand your code any complain about it being unstructured.
If noone except you ever sees the code:
Why the hell are you bitching about this??? Do it your way and leave us alone! Noone cares anyway!
Name:
Anonymous2006-06-13 5:33
Fighting over goto is gay; every tool has its uses, and while goto is rarely needed, sometimes it's needed and a man's gotta do what a man's gotta do.
>>9-10
No, the proper order is: text/plain > HTML >> RTF >> DOC >>> PDF > PS .
The reason why RTF and DOC are better than PDF and PS is that they are not waste formats. You can do something useful with them, like editing, proper copying of vectors, etc. When you convert a file to PDF or PS, it's basically dead - you can't do shit with it.
Remember? MS-Word (2000 - xp) can't even save its own old formats from Word 6 and 7. You are lucky when you can open them without errors.
Not to think of places where both versions run together in one domain, because the company upgrades always just a bit. (not much money) Oops. Suddenly all workstations with Word 6/7 can't read the files anymore. This is just plain shit. (And yes such things still exist, because Microshit's licensing is that expensive)
Every good word-processing program should be able to read and write its own formats - even if they are VERY old. Isn't it sad that competitive products can read their own formats better than their programs can?
PDF is much better than doc.
It's not open, but Adobe doesn't change the format every second day so that competitive products aren't able to read it correctly.
And if you used the right programs, you could edit them, too.
gb2/b/
Name:
Anonymous2006-06-13 17:26
>>13,14
ProTip: You can open PDF files with KWord.
Name:
Anonymous2006-06-13 17:32
>>16
It's, like I said, mostly read-only. By that I mean you can rewrite part of it and hack it, but it's kind of like C++ sauce and executable code. Too much is lost in the process to make anything useful of editing it.
>>17
DOC allows you to do something useful with what you get; for example, converting to HTML. Adobe's shit is a piece of shit (and it's not really open), and it's specifically designed to be hard to copy and not useful to edit, plus it now includes digital restrictions management and all the shit you can expect from Adobe.
Name:
Anonymous2006-06-13 18:19
>>19 DOC allows you to do something useful with what you get
Standardized formats like OpenDocument-Format can do the same. They're just readable in ten years.
for example, converting to HTML
A conversion into invalid html. Great. Are you happy when smoeone gives you a bucket full of crap as a present?
And I never said that PDF was open. I just said that Adobe isn't that kind of bith who changes the file-format because they run low on money and have to make ppl buy their new products.
After all it is readable on most modern OSes - and doc isn't.
And maybe it has DRM. But if you do not want to buy stuff, then what are you bitching about? That you can't get it for free from someone else? Sure, there are WAY better formats, but that's why the order wasn't that "pdf > everything", but just "pdf > doc"
Name:
Anonymous2006-06-16 17:00
NOT READING THIS PRO-GOTO PROPAGANDA
DOWN WITH GOTO.
Name:
Anonymous2006-06-17 1:07
STACKS ARE EVIL
GOTO OR GTFO
Name:
Anonymous2006-06-17 10:00
In this thread, peevish fucks don't realize that the article linked to is what passes for elaborate humour in academia. If you can't tell, it's a what-if "the reviewer didn't get laid last night" on several old and venerable papers in the area of computer science.
Also, goto is still relevant. Can't do extremely lightweight exception handling in C without it, unless you want to go if((fd = open(gargar, O_RDONLY)) < 0) { free(gargar); free(poit); close(other_fd); pthread_mutex_unlock(&mutex); return EVIL_ERROR_HAPPENED; } for every resource acquisition function you call...
Name:
Anonymous2006-06-17 10:56 (sage)
Can't do extremely lightweight exception handling in C without it,
Yeah, and you can't do loops in asm without it!
PROTIP: In every situation where you could use goto, a high level construct is a better solution. If your language of choice doesn't support those, find a better language.
Name:
Anonymous2006-06-17 12:36
As >>23 said, goto is necessary for good exception handling sometimes, and also for many constructs where performance is absolutely critical (e.g. some types of operating system code, realtime or not).
Name:
Anonymous2006-06-17 12:44
IN BIOS-LEVEL FIRMWARE CODE YOU MIGHT NEED TO JUMP AROUND BEFORE DRAM AND THEREFORE STACK SPACE AND THEREFORE WHERE FUNCTION CALLS STORE THEIR RETURN ADDRESSES IS INITIALIZED
ONLY VALID USE OF GOTO
Name:
Anonymous2006-06-17 14:18
>>24
Dude, don't you have any experience with C? Writing application-level code, you'll be drowning in cleanup code unless you have an "out:" label down somewhere and go like if((fd = open(gargar, O_RDONLY)) < 0) { status = -1; goto out; } or something.
Which is kind of why I prefer to write application-level code in a language that has garbage collection and try-catch-finally. Though you have to watch out for the finally...
Name:
Anonymous2006-06-17 14:21 (sage)
>>27
Furthermore, Java has labelled break and continue. Python etc have generators. If these aren't contrary to structured programming as laid down by Wirth and those other purist teachers, I don't really know what is.
So sure, you could skip the out label and just go, do { if((fd = open(gargar, O_RDONLY)) < 0) break; ... ok = true; } while(false); if(!ok) { handle exception and so forth }, but that's a rarer idiom than out-labels.
Name:
Anonymous2006-06-17 14:55 (sage)
>>27
Yes, you need the goto because C doesn't have high level constructs for exception handling. Isn't that what I said?
>>28
A language shouldn't force a programmer to abandon gotos, and very occasionally an algorithm can be expressed more elegantly with a goto somewhere, but normally when you feel the need to use a goto, something is wrong.
Of course structured programming shouldn't be overdone. When I write in Pascal, having to use the Result variable leads to lots of nested ifs in complex code, whereas things are much clearer in C with the return keyword.
Name:
Anonymous2006-06-17 16:04 (sage)
>>29
Good luck finding a better language than C for system-level programming, and for doing stuff on an embedded platform. 'sides, advocating that everyone just toss C is like telling everyone to stop wearing pants because skirts are simpler.
Name:
Anonymous2006-06-17 17:12
>>28
Purists also reject break and continue, which is amazingly retarded, and since when is purism good?
Name:
Anonymous2006-06-18 3:12 (sage)
telling everyone to stop wearing pants because skirts are simpler.
What an excellent idea! Unless you have hairy legs
Name:
Anonymous2006-06-18 10:00
I had a dream where I was wearing a long dress. It was so comfortable.
Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy