iostream.h (vs) iostream

This is a discussion on iostream.h (vs) iostream within the C++ Programming forums, part of the General Programming Boards category; sorry if this has been repeated alot but i don't want the answer for me because i already know. Here ...

iostream.h (vs) iostream

sorry if this has been repeated alot but i don't want the answer for me because i already know. Here is what its all about :

I've been arguing alot with some friends lately. They say that since iostream.h works then they don't care about following the new standard (with iostream).

I showed them some sites that explain the improvements of the new standard but they kept saying that it works and their proffessor didn't say anything about the new standard so the old one shouldn't be bad.

Now i kept arguing with them and im real ........ed. They think that using iostream along with the 'using std::' statements is just useless , tiresom and some other stupid reasons.

What i want from you guys ... is following the old standard bad at some cases? when and why?

I'd be thankful for posting as much cons as you can about following the old standard...

If it works for them, and their teacher accepts it, and they prefer not to get in the habit of doing things according to the standard, then it's fine.

New compilers don't even accept <iostream.h> (.NET 2003 doesn't even give you a warning or an informative error message). So if they ever want to use their code again in the future, they would have problems.

It is not wise to mix old a new headers, since it is possible that things could be implemented differently. Because of that it could be dangerous for them to use the newer features of the language that didn't exist in the old headers. That is unlikely to be a problem, but you never know. They probably wouldn't care about this as long as their code works, which is fine.

Also, the reason the library stuff was put into a namespace was to avoid naming conflicts. I have seen several newbies post problems on programming forums that were caused by naming a function or variable the same thing as a standard library name. With the new headers you can fix that without changing your function, with the old headers you can't.

And finally, some people prefer to be different, to fight the Man, to not give in to stupid rules. Others prefer to avoid laziness, make good habits that will help them in the future, and be smart. Those aren't the only two options, but if they like the first one better, let them be. There are more important things to worry about, in my opinion.

>using iostream along with the 'using std::' statements is just useless , tiresom
Definitely tiresome, and in my experience mostly useless, so your friends are correct for the most part on this point.

>Now i kept arguing with them and im real ........ed.
The problem is on your end then. Don't try to force your views on others when it's obvious that they don't care. Somebody used to say that you can lead the horse to water, but you can't stop him from voiding his main...or something like that.

>is following the old standard bad at some cases?
Technically there is no old standard. There is standard C++ as defined by ISO, and pre-standard C++ as (commonly but selectively) defined by the ARM. Using pre-standard C++ isn't "bad", per se, but it isn't what we would consider programming with an eye toward the future. Already there are popular C++ compilers sold that reject pre-standard C++ (you get an error if you try to use iostream.h), and the older versions of those compilers really suck, so there's a lot of incentive to upgrade. That would be an argument against pre-standard C++, by the way.

As long as your friends understand that iostream.h and the like aren't guaranteed to work (or worse, aren't guaranteed to work like they expect, though still compile and run), aren't guaranteed to continue to work even if they do, and that they lack useful features of the standard headers, they're making an informed (but stupid) decision and you should respect that.

I'm afraid you'll have to lump your friends in the category of lost causes. You know people like that, they show up here with GODAWFUL code and try to argue with Salem, myself, quzah, Thantos, or Hammer, whoever decides to take up the banner of the Cprog gestapo until they get frustrated and leave. For people like that there's no help and no hope. Such a shame.