This ever happen to you?
This ever happen to you?
It seems like every time I go to a C\C++ forum other than this site all the C++ programmers act like It's sin that I'm using C instead of C++ and it going to ruin my thinking if I ever go to a OOP language in the future.I think C++ is a great language just I have always seemed I like C better when I tried to learn them.
Last edited by Twitch on Wed Jul 18, 2007 6:45 pm, edited 1 time in total.
- AndrewAPrice
- Member
- Posts: 2299
- Joined: Mon Jun 05, 2006 11:00 pm
- Location: USA (and Australia)
- Colonel Kernel
- Member
- Posts: 1437
- Joined: Tue Oct 17, 2006 6:06 pm
- Location: Vancouver, BC, Canada
- Contact:
- AndrewAPrice
- Member
- Posts: 2299
- Joined: Mon Jun 05, 2006 11:00 pm
- Location: USA (and Australia)
Objective-C++Colonel Kernel wrote:OP: Try Objective-C.Solidus117 wrote:OP: Try C#.
Wikipedia wrote:Objective-C++ is a front-end to the GNU Compiler Collection that can compile source files that use a combination of C++ and Objective-C syntax.
My OS is Perception.
Hi,
I guess the most desirable thing would be to understand C and C++ as 2 separate entities and pick the most appropriate for each programming problem. For example, while C++ is probably wonderfully suited to programming a window manager, you MMU is probably going to be "C-style" whichever flavour of compiler you use.
The downful of this approach is that you have to be able to completely switch from one programming mindset to the other each time you start a new program
Cheers,
Adam
I guess the most desirable thing would be to understand C and C++ as 2 separate entities and pick the most appropriate for each programming problem. For example, while C++ is probably wonderfully suited to programming a window manager, you MMU is probably going to be "C-style" whichever flavour of compiler you use.
The downful of this approach is that you have to be able to completely switch from one programming mindset to the other each time you start a new program
Cheers,
Adam
Re: This ever happen to you?
Nearly all C++ programmers haven't a clue what C++ can do but know that the C compiler they used to use now doesn't accept their code anymore. They then conclude (correct but only up to a limit) that they're using C++. They still don't use classes, encapsulation, templates and so on because they're mostly afraid that they'll lose control of what the compiler will do.Twitch wrote:It seems like every time I go to a C\C++ forum other than this site all the C++ programmers act like It's sin that I'm using C instead of C++ and it going to ruin my thinking if I ever go to a OOP language in the future.I think C++ is a great language just I have always seemed I like C better when I tried to learn them.
Just today somebody came up to me and explained that he wasn't using much of C++ "because it can just call malloc at about any time, even without you using it in your code". I of course took out my Stroustrup and marked the pages for him to read that that's really not true.
If you use classes, encapsulation, templates, libraries and supportive classes & thought methods properly, your code will be 50% smaller and more efficient (assuming you have a project of at least 10-100k lines). Most of all, it'll be clearer, more maintainable and more logical. If you abuse them, your code will be horrendous. Look at C++ as tools that enable you to do what you need to do. If you use tools for what they're for (flyswatter for a fly, screwdriver for a screw, hammer for a nail) they'll do very well. If you abuse tools (hammer for a fly, screwdriver for a nail, flyswatter for a screw) you'll have an incredibly hard time and nobody'll even want to think about maintaining your code. Explain to people that logic and you might get them convinced. Most are too encrusted in their way of thinking to change mindsets enough to be able to use the tools, so the only thing they'll be able to do with them is abuse them.
Re: This ever happen to you?
You can use a hammer for a screw though - I don't know if the expression is more widespread, but here in England, a hammer can be known as a Birmingham Screwdriver.Candy wrote:If you abuse tools (hammer for a fly, screwdriver for a nail, flyswatter for a screw) you'll have an incredibly hard time...
Re: This ever happen to you?
You can use templates for doing functional programming too, so yes, the analogy holds .AJ wrote:You can use a hammer for a screw though - I don't know if the expression is more widespread, but here in England, a hammer can be known as a Birmingham Screwdriver.Candy wrote:If you abuse tools (hammer for a fly, screwdriver for a nail, flyswatter for a screw) you'll have an incredibly hard time...
- piranha
- Member
- Posts: 1391
- Joined: Thu Dec 21, 2006 7:42 pm
- Location: Unknown. Momentum is pretty certain, however.
- Contact:
[quote]One of my favorite quotes:
Edsger Dijkstra wrote:
“Object-oriented programming is an exceptionally bad idea which could only have originated in California.â€
Edsger Dijkstra wrote:
“Object-oriented programming is an exceptionally bad idea which could only have originated in California.â€
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
- piranha
- Member
- Posts: 1391
- Joined: Thu Dec 21, 2006 7:42 pm
- Location: Unknown. Momentum is pretty certain, however.
- Contact:
No, thats OK, I was being bored. And I don't want to yell at anyone who is dead.
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io