| | |
void main ftw
![]() |
> "Because I feel like it" is as valid a reason as "because the standard says so".
How about "I want my programs to work" vs. "My programs work by magic so long as I use the codemangler 3.0 compiler".
Why stop there?
char *str ; gets(str);
usually had a pretty good chance of success, for DOS programmers.
Does that make them good, or just lucky?
Something else you might want to consider.
If you thought learning C was hard the first time around, just try unlearning a bunch of crap C because you new codescribbler 4.2 compiler complains about all sorts of things, and the OS just lays your program out cold whenever it touches an illegal pointer.
Do you?
a) re-learn a bunch of compiler specific tricks for each new compiler.
b) learn ANSI-C and stop worrying about when the next incompatibility is gonna bits your ass.
I did "a" exactly once, and it sucked!
Oh, and it's not just hypothetical waffle.
http://users.aber.ac.uk/auj/voidmain.shtml
At least one REAL machine barfs on void main.
Do you think all this internet stuff works because
a) everyone followed the standards
b) everyone did their own thing which "worked for me" in their own little corner of the universe.
Or how about two banks transferring money. Bank A sends it in hex, and bank B receives it in decimal, do you
a) congratulate the programmers on their sense of individualism
b) hammer down the doors screaming "where's my **** money!?"
How about "I want my programs to work" vs. "My programs work by magic so long as I use the codemangler 3.0 compiler".
Why stop there?
char *str ; gets(str);
usually had a pretty good chance of success, for DOS programmers.
Does that make them good, or just lucky?
Something else you might want to consider.
If you thought learning C was hard the first time around, just try unlearning a bunch of crap C because you new codescribbler 4.2 compiler complains about all sorts of things, and the OS just lays your program out cold whenever it touches an illegal pointer.
Do you?
a) re-learn a bunch of compiler specific tricks for each new compiler.
b) learn ANSI-C and stop worrying about when the next incompatibility is gonna bits your ass.
I did "a" exactly once, and it sucked!
Oh, and it's not just hypothetical waffle.
http://users.aber.ac.uk/auj/voidmain.shtml
At least one REAL machine barfs on void main.
Do you think all this internet stuff works because
a) everyone followed the standards
b) everyone did their own thing which "worked for me" in their own little corner of the universe.
Or how about two banks transferring money. Bank A sends it in hex, and bank B receives it in decimal, do you
a) congratulate the programmers on their sense of individualism
b) hammer down the doors screaming "where's my **** money!?"
So it appears I have already pissed off a purist.
I'm not bashing standards all together, but doing something for the sake of the standard where it saves me a bit of effort to do it in another way that works just as well is retarded. So what if some arbitrary machine somewhere in space won't run my code? And yes jephthah, Microsoft did it. Look at how many non-standard things Microsoft does and gets away with. I deserve some of that action too.
Everyone should use void main if only to be daring.
I'm not bashing standards all together, but doing something for the sake of the standard where it saves me a bit of effort to do it in another way that works just as well is retarded. So what if some arbitrary machine somewhere in space won't run my code? And yes jephthah, Microsoft did it. Look at how many non-standard things Microsoft does and gets away with. I deserve some of that action too.
Everyone should use void main if only to be daring.
Spoon boy: Do not try and correct void main. That's impossible. Instead... only try to realize the truth.
Neo: What truth?
Spoon boy: There is no void main.
Neo: There is no void main?
Spoon boy: Then you'll see, that it is not the void main what you correct, it is only yourself.
Neo: What truth?
Spoon boy: There is no void main.
Neo: There is no void main?
Spoon boy: Then you'll see, that it is not the void main what you correct, it is only yourself.
Siddhant Sanyam
(Not posting much)
Migrate to Standard C++ :When to tell your C++ Code is Non-Standard.
Please Read before posting: How To Ask Questions The Smart Way
(Not posting much)
Migrate to Standard C++ :When to tell your C++ Code is Non-Standard.
Please Read before posting: How To Ask Questions The Smart Way
![]() |
Similar Threads
- Why NOT void main() (C++)
- int main() or void main() ??!! (C++)
Other Threads in the IT Professionals' Lounge Forum
- Previous Thread: Is Updating Windows Xp Necessary
- Next Thread: I need Help in Data Flow Diagram Of Inventory managnment system
| Thread Tools | Search this Thread |
1gbit advertising advice amazon answers archive british broadband business businessprocesses career carrier censorship cern china cio collectiveintelligence connectivity consumer consumers corporateearnings datatransfer debtcollectors dictionary digg digital ebay ecommerce email employment environment facebook food government grid high-definition hottub infodelivery infotech intel internet interview ipod isp japan kindle lhc library malware marketing mit moonfruit news onlineshopping piracy piratebay pope porn program questions r&d religion remoteworking research retail security sex shopping simple skype smallbusiness smb sms socialmedia socialnetworking software softwareengineer spam speed spending startrek statistics stocks study stumbleupon survey tabletpc technology touch-screen touchscreen twitter uk videoinprint voips web webdeveloper windows words






