WTF is this nonsense!?!
You realize that what you're saying is complete nuts and totally wrong, right?
Quote:
Originally Posted by
dxfoo
They do the same thing. If you're not requiring OO features for strings in your particular program, ignore these silly suggestions.
OO is the bread and butter of a C++ programmer. Telling someone to ignore it is silly.
Quote:
Tip: In fact, using std::string is actually bad because you can't add your own methods to it, nor can you improve what's already in there.
Oh, this one is right. Can you add functionality to C-style strings? Can you improve what's already there? strcpy? strcmp? We're in the same boat then, aren't we?
Quote:
You'll also be using c-string functions outside of std::string.
Well yes, of course. Not everything is contained inside std::string. Most algorithms in the standard library are free functions that work with strings.
And let me tell you this: even with parsing, I have had little or no need for C functions. Yes, that's right. C functions are not required.
In fact, by not relying on C-style strings, I (and the standard library) have been able to create algorithms that work on all containers that support the proper concept. Not just strings. That's called generic programming.
Quote:
You'll end up writing your own string class sooner or later.
Nonsense. I have had no need to write a string class of my own so far.
Quote:
So LEARN how to work with c-strings like you're doing now because you'll get better at working with dynamic arrays and such for your own string class later.
Nonsense. We have tools to handle such things for us. And even if you would write a string class later, it doesn't excuse the use of C-style strings. Always use a string class. If not your own, then std::string.
Quote:
People that teach the most abstract way first are probably the worst programmers out there because a) you won't learn anything, and b) you won't want to go back.
Complete and utter and ridiculous nonsense!
Go back and learn C. Leave C++ programmers alone. Let them create safe and maintainable code while you mess around with low-level stuff.
There is more to just learning how things work in hardware. You also have to learn logic, to apply algorithms, and to actually accomplish what you want to do.
What you are suggesting undermines the whole C++ language. Abstraction is key! And there are lots and lots and lots of good tools already out there. So use them!
If and if you need to roll your own should you do so. But that is not a priority! The priority is writing good programs that accomplishes the task given quickly and efficiently. If you're going to hand-roll everything, you can kiss that goodbye.
Quote:
You should remember how effective it is when a teacher teaches the hard way first and then the easy way, and these good teachers don't hang out on forums often with 22k posts (they got salaries).
What are you, dumb? What are you are saying is completely the opposite approach of things. Usually the teachers show the easy way first and gradually you dive down into the hard way. Do you think there's a reason they do it that way? Or are they just dumb forum members with 22k posts?
And yes, btw, there are a couple of programmers here who has actual jobs, yet hang out on the forum with a massive post count. Because they choose to spend their free time here on the forum helping people with advice instead of belittling others.
Quote:
So learn c-strings, get good at it, and then do whatever you want.
The opposite. Avoid them like the pest they are. Forget they exist.
Use them only later if you have to. Right now, you don't.
Get good at utilizing the tools at your hand instead of trying to learn nonsense which you won't use 99% of the time.
Quote:
You'll be using arrays the rest of your life one way or the other.
But arrays != C-style strings.
'Nuff said.
Now, if there's nothing more, perhaps you should go back and stay in your C corner.