Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×

Comment Re:A tool for when you need to get the job done (Score 3, Insightful) 553

actually, it's because if you know what you are doing you can make it run as fast as C, and access the hardware as easily as free, and also, if you know what you're doing you can make higher level and more flexible abstractions.

people seem to have an objection to the "know what you are doing" requirement, and seem to think that in C, you don't have to know and the code manifests well. If there is any truth to that... that C code is all nicely organized now, and naturally safe, then it's only because the C programmers have internalized certain idioms and avoided other possible ones... which is what you have to do in C++ as well to use it well.

the idea of a language which works well without knowing what you are doing is laughable to me. The illusion comes, for example, from languages where you can build a robust web server in five lines (or whatever)... yes, because it has a webserver built in! if you are going to do something besides say "run this program which was already written", then you need to understand logic and machines. There is no way around that.

C++ can be made as fast as C, don't deny it because I can write a C++ program that IS C. So it's a truism. That means you only need any feature that imposes any performance hit if it saves you some other way, like protecting memory or allowing one to save time in what is actually the most precious resource, developer time.

Comment Re:C++. lol. (Score 1) 553

anyone that believes in perfection is an idiot.

It was never at all meant to be perfect, it was meant to be useful.

I'm surprised at all the whining about C++, especially the idea that C is somehow a more readable or organized language. Perhaps after all the general purpose programmers went elsewhere, the COMMUNITY of c programmers started writing cleaner code... ok, but the language... promoting that?

C++ aimed for complete-as-possible compatibility with C, especially static linking which helped ensure that C++ can follow C anywhere, a useful thing.

blaming C++ for the stupid things purists might like it odd, since purists have never been fond of C++ afaik, and if so, why are they in a multiparadigmed language that allows you to break most of it's rules at will (using C syntax).

It's like blaming Country Music Lyrics on English.

I learned C++ around 1993-94 I guess after having been a C programmer from about 84-85. This is the way to use it. The fact that you can have class hierarchies with structures is itself useful. I have converted C code to C++ simply by making a structure able to initialize itself, a safe fix for code which would have been a nightmare to fix some other way (go to every malloc of the structure and do it there, all throughout the code?)

But evidently such use of C++ provides too much temptation for some. That's too bad.

Also, as a C programmer at that time we all became aware of how the C compiled, what instructions you were really looking at, and in C++ at that time, my colleagues and I at least (in the game industry then) continued to view C++ this way. If I learned a new feature of C++, I studied how it would look in memory, how it would look if it was a C structure (or set of such), making it quite easy to avoid certain problems.

As a C programmer I expected myself to do this. Also, this revealed where the performance hits were, and what to avoid. C++ is multiparadigmed (or unparadigmed, or, a crazy toolbox)... so? man up and learn the tools including which ones you don't want.

As far as the problem of what OTHER programmers do with C++... if people have not seen crazy things done with C... confusing bad things... I cannot explain that. How can that be? Some historical accident because the language does not prohibit it, it's up to the programmer.

Then again, as long as it's not proprietary, I couldn't care less what languages other programmers like.

Comment Re:Nooo!!!! (Score 1) 128

I am more or less an intermediate PHP hacker. Most of my experience is in Perl and mod_perl.

Right now, what I find the most frustrating about PHP is the embedded model. It seems that you have to jump through a lot of hoops to work around that. Maybe once you get used to jumping through those hoops it is okay, but (for me anyway) it seems like I am working against the language when I want to abstract webpages away from their files, for example.

It seems to me that this is one of those areas where the easy-access part (templating built right into the way you code) starts making it harder to do more complicated things.

Coffee Maybe Not a Health Drink! 381

perbert writes "Canadian researchers have published a study in the Journal of the American Medical Association indicating that excess coffee drinking (4+ cups a day) could lead to an increased risk of heart disease if you have the wrong gene. In light of other studies linking antioxidants in coffee to a reduction in heart disease, who is right? Or will they cancel out in a coffee death-match?"

Slashdot Top Deals

HELP!!!! I'm being held prisoner in /usr/games/lib!

Working...