Does your project use iostream? I always hear about iostream as the example of C++'s bloat, do those forced to use the language actually use it?
Name:
Anonymous2008-04-22 20:35
cout << sucks << my << balls. << "\n";
printf("Ftw.");
Name:
Anonymous2008-04-22 21:39
I think C++ specific libraries mostly drank the cool-aid, so you have to use them if you want to do anything interesting with streams.
I'm not sure though, as I'd slit my wrists rather than write as much as a iostream Hello World.
Name:
Anonymous2008-04-22 22:09
>>1
Stroustrup is either a huge troll or a genuine fucktard, who the fuck would overload bitwise operators for something as trivial as text input and output or use a bloated class for strings instead of a character array?
Name:
Anonymous2008-04-22 22:15
>>4
It takes a retard to not notice the difference when you see either a shift or streams.
>>6
a << b; is a statement with no side effects whatsoever, if a and b are integers and << is bitshift.
Therefore, if you see a << b; you know it's not bitshift.
Name:
Anonymous2008-04-22 23:42
a bloated class for strings
Name:
Anonymous2008-04-23 0:03
Ok sepplesfags, do this:
#define OUTPUT(f, a, b, c) fprintf(f, "%9.4lf %s %.9s", a, b, c)
>>7
Or that it *is* bitshift and someone forgot to assign the value to something else because they're braindead, which would also explain why they're programming in C++.
Personally I think the whole concept of overloading operators is a bit broken, but it beats having BloatedInteger(2).add(3) nonsense.
It just needs to be used intuitively and sensibly, which arbitrarily using bitshift for file i/o is neither of.
>>15
Yes, < in the shell is for input, and in iostream << is used for output. Not to mention it could have overridden < and > -- and maybe even | -- as well.
That might be an interesting project though, but I hate C++ and will never personally do it.
>>16
No.
< is not for input.
a < b in the shell feeds b's contents to a.
cout << "hello". What's so hard to grasp about that? It's the same
a > b writes the output of a to b.
cin >> i;
cin reads (and evaluates) to some value, which is written to i. (Actually, it's not that way in C++, but you get the point, don't you?)
But really, how common are bitshifts in your code that you could really confuse them with stream I/O? I'm a C person, but I still find this argument inane.
Name:
Anonymous2008-04-24 1:21
>>23
Forget that, C++0x will suck even more than C++ without 0x.
Name:
Anonymous2008-04-24 1:22
>>23
Actually, know that I look at that, the writef() method should be used like this.
cout.writef("Hello, world!", endl, "New line! And now a number.", endl, 3.5);
Name:
Anonymous2008-04-24 2:43
COOT << "COOT"
Name:
Anonymous2008-04-24 5:25
Yeah, iostreams is probably one of the worst thought out features of C++. It's no wonder most people just give up and use printf.