C, or C++ Sup Forums?
C, or C++ Sup Forums?
Other urls found in this thread:
open-std.org
twitter.com
D
Rust, unless you're pajeet
Two inferiors who cannot follow instructions so far (explains why they are both scared of manual memory management)
C
for what ourpose
>scared of manual memory management
I kode in ASM boi, now pull down your panties and bend down
Standard desktop or server software. Assume compiler support for both is available on the hardware.
I bet all people who hate C don't know it and are scared of manual memory management. They also feel the urge to defend their incompetence by saying C is useless and Rust/other meme langs the way to go :)
>Standard desktop or server software.
You need neither of them. Stop falling for the Sup Forums memes
Agreed. Curious though on your thoughts for C++?
Both D and Rust allows you to manage memory by yourself. It's not all that special.
Endless pain and confusion
There is nothing, NOTHING ``scary`` about manual memory management. It's tedious.
c++ because RAII
The right tool for the right job, OP.
Hell, even JavaScript can be a useful tool if used correctly.
>I bet all people who hate C don't know it and are scared of manual memory management
I work as a C programmer for a living, I am very aware of how it works, which is why I prefer would have preferred working in C++.
Enjoy your 500MB ram hoggin' text editor
>500MB ram
Please. It's 2020.
>if used correctly
You blind, son?
Curious, do you work on embedded systems or somewhere where a C++ compiler doesnt exist?
For the embedded stuff I do, I work on with a large existing code base, so rewriting it isn't feasible and I have to stick to existing code guidelines because I'm not the only developer.
We also make and maintain drivers, and I work on the Linux modules. Since it's not feasible to work with any language other than C for this either, I'm pretty much stuck with C.
I write a lot of our tests in Python though.
Thanks for the info
C++ where you have RAII, classes and templates
If you've got self control C++.
If you're a lazy shit then C.
Personally I prefer C but yeh I'm a lazy shit.
Different languages for differents purposes.
Move on now.
Classless C++.
have you tried C-- ?
D
RAII >>>> raw malloc/free calls
C# all the way.
C with smart pointers and vectors.
t. r/cuckold
C++ if you're working alone.
C if you're working with others.
C++ if you're working with others, and the others are all smart.
I would never advice working with dumb people
Sometimes you don't get to choose your company.
Python
I only do research, so most people I work with are either phd's or working on their phd.
Some are still bad programmers, but it is not because they are stupid
c#
Well, that was the real point.
C++ is objectively better
This. There are so many features that come in handy, even if you're writing C-style C++.
well they certainly have objects
OOP is the last reason to use C++. Everything else is more useful.
C has a few features that C++ does not, but C++ has too many features.
You don't have to use all of C++'s features. Subsetting C++ based on the requirements of the task at hand is very common.
How long would it take to learn both C++ and Java to a decent level?
>C++
A long time. It's a big language and everyone prefers to write it a different way.
>Java
Not nearly as long.
both
>A long time
Do you have an approximation?
Why would Java take considerably less time? Does it have many less features?
It depends how fast you learn. Programming comes a lot more naturally to some people than others, and the resourced you have are also important. Could be anywhere from a few weeks to a few months.
>Does it have many less features?
Yes, and there's also much less to worry about in general. Java is about making it as simple as possible to write "professional" code.
Sorry, my approximation there is for Java. For C++ it'll be at least a few months.
I know C already, so it should be fine then.
That's excellent, but don't just write things the "familiar" way. You should try to use RAII for example.
C++, but only when working with people who both understand it and can restrain themselves somewhat.
The lower theoretical in C is ruined by the amount of project/group specific macro soup wherein the same handful of patterns is reinvented everywhere with little consistency between them.
This.
> lower theoretical *fat*
C is like old good wine and never goes bad, cpp is like beer, a bit bitter and makes you fart from your mouth.
>C++, but only when working with people who both understand it and can restrain themselves somewhat.
This.
>on an internship
>3rd sepples programmer in the room
>find a certain part of one library that's batshit fucking insane with literally 40 classes in a single hierarchy, multiple inheritance. 4 template parameters were the norm
>"Yeah, it was written almost 10 years ago by the previous head of the division. He had just read about templates and things. He left the firm in 2010 and since then we're not really touching 《that》 part code"
The rest of C++ codebase was a joy to read, though, and most of things are moved to C++11/14. I'm considering applying there part time, but I'll first have to see my university schedule.
You're right, the C preprocessor should be deprecated already.
Is there an introductory C++ book that enforces good practices?
I've heard good things about Accelerated C++, as well as C++ Primer.
Anyone read the C++ metaclasses proposal?
Seem like a decent way to get rid the the typical C++ clutter, without getting bogged down in SG7 politics.
I want two things: modules and template lambdas (so [](){} becomes valid C++)
>""
Isn't that a Java thing? I thought you just omit the angle brackets to automatically deduce template arguments.
Seems like it would be a nice addition. Not a fan of the $ syntax though, I would prefer just a "metaclass" keyword.
I mean like this.
auto lambda = [](T a, U b){ return a + b }([acc]
can't find the proposal atm
>Isn't that a Java thing? I thought you just omit the angle brackets to automatically deduce template arguments.
The only time I've encountered where this doesn't work is with class templates, and then you must use .
Иpo
Vgh?