Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@illusion466 interested to see why you think they are both rubbish.
C is incredibly useful for performant applications -
@illusion466 though embedded systems it matters, I get your point.
My main point was referring to the evidence that one language/paradigm is more productive than the other. Rather than just assuming based on your own bias and experience.
I'm here to challenge dogma. -
I don't think you can compare the two. Yes they share the name and the Syntax, but the programming style is very diffrent. In c++ one can programm Object Oriented, Imperativ or functional and probably in many ways more I don't now of. In C, as far I know, Imperativ programming is the only way. I'm not saying this is a bad thing, but because I like mixing styles I prefer C++. Important is "prefer", the language you write the best code in is automatically the best language for you.
-
@Batburger I think they can be compared to a degree, they are both general purpose programming languages.
But that wasn't really the crux of my point.
My biggest problem is with people who blindly accept the "common knowledge" that C++ or OO are more productive than another language or paradigm, when there are actually many good studies that show there really is no difference. This has been debunked many times.
Yet do a Google search and one sees such an idea is entirely a minority view. -
@Hedgepig I 100% agree no language is the best. One would never use c++ for integrated chips for instance. Or JS for AAA games. Or R for extending applications.
-
@Batburger though most of those have been done. AAA JS game is becomming more and more technically feasible
-
b3b343777ym_post.addFlag( SARCASM );
m_post.comment( "I personally like writing my algos in xhtml. I heard it was a really fast programming lang" );
m_post.removeFlag( SARCASM ); -
cwizard5877yI don't understand these 'wars' people always bash C/C++ and then go ahead and give arguments on why we need languages like Java. It's like saying a screwdriver is bad for hammering nails, yes I know that's why we have hammers! I agree that there are bad languages I just don't think C or C++ are one of them.
-
bioDan61597y@Hedgepig I get what you're saying, but i think you are dismissing OOP completely.
It's just a methodology that isn't available in C (a.f.a.i.k)
I like the structure it adds to my code, makes it somewhat easier to communicate "how it works" when its about a complex system.
But i dont always code like that especially when im writing scripts. -
@bioDan out of interest did you learn OOP from the start?
I'm more just frustrated by the dogma of OOP, it is almost completely accepted as the best methodology based on little to no evidence beyond personal experience.
Funny enough I am more of a functional guy -
bioDan61597y@Hedgepig nah.. I started by playing with code that my older cousin wrote in QBASIC and PASCAL. They are not (a.f.a.i.k. or at least QBASIC isnt) O.O.
Then i learned C and quickly moved to C++ during my high-school period. But even although i knew what my code does in a very superficial way, i didnt do any O.O.P. (this was in Israel, from about 1995-2002) -
@bioDan Sounds like a good procedural foundation. Though I think it's not a bad idea to learn other methodologies like functional or logic
-
You labelled this as a language war, but it's more of a paradigm war, so I'll contribute to that:
I think OOP is overly complicated for one simple reason: objects are stateful. Just think about this: how often do you get the same results when calling an object's method with the same arguments? -
bioDan61597y@Hedgepig it may even be an excellent idea! I guess its all about the same old question of "what do you want to develop today?"
-
@bioDan I've seen people struggle with OOP because they end up writing classes that handle too much state.
Reasoning with state while handling logic makes it harder to write and test code. -
On the other hand, one can make their objects immutable and make methods return new instances that reflect the state changes.
This eliminates side effects on objects and thus reduces complexity. -
@shellbug can that be called OO then? My understanding is it is inherently stateful because the core principles of OO are to deal with state.
-
@Hedgepig I believe so. An immutable object is still a representation of state after all. Take a look at Java's String class for example.
Related Rants
-
nikmanG16CS Professor: “What M word is the black hole to all productivity?” Student: “Management” CS Professo...
-
jsombrio28They just bought 2 fucking 23" extra monitors for every developer in my org. FEELS GOOD MAN
-
cjaro5We just spent 30 minutes standing around watching Elon Musk launch his car into orbit. I love working in IT.
Disclaimer: I apologise in advance for those tired of language wars, if it bugs you that much just skip this rant.
"C++ is better than C"
An accepted truth. OO is better than Procedural, C++ is an upgrade from C, it fixed all the problems.
End of.
Except - when it comes to actual evidence, empirical studies have shown that there are no productivity gains with C++ vs C.
This bugs me the most because it's such a fringe view, OO has dominated industry purely by dogma, alternative programming paradigms are just simply ignored because: "OO is best. End of."
https://researchgate.net/profile/...
rant
oo
procedural
studies
dogma
productivity