Memes aside, should I learn C or C++ first?

Memes aside, should I learn C or C++ first?

Other urls found in this thread:

github.com/Vild/PowerNex
github.com/Vild/PowerNex/blob/master/env.sh
github.com/Vild/PowerNex/blob/master/Utils/GenerateSymbols.d
twitter.com/AnonBabble

C++

If you're looking for a neat book to start with, buy "Accelerated C++".

If you intend to learn both, do C first.

this guy is correct.

when learning C++, make sure to read stuff that is updated for at least C++11, and to use idioms made for C++11 and on. the language changed quite a bit.

c++

c is nearly useless in 2017

Whatever you will be more productive in. C++ has higher level features which can make life easy, but they can mask what's going on under the hood. C lacks nice features like templates, destructors, abstract classes, etc, but you will have to know exactly what you're doing. Really a matter of preference, depending on what level you want to work at.

Neither.


Learn C if you're going to be writing operating systems or device drivers.

Learn C++ if you want to make video games.

is there an equivalent to k&r for C11?

Learn C, then don't learn C++.

c++ is just a meme, c has been the industry standard for over 40 years

What if I'm just a hobbyist wanting to develop skills for future jobs?

C++. There remains close to 0 reasons to bother with such a featureless low quality language such as C in this century. There is a thing called evolution.

Anything C can do, C++ does it better. C is a subset of C++.

>C is a subset of C++

>hobby
Learn D. You will be a good programmer

That is some ridiculously weak bait.
Get the hell out of here until you get something better.

Yes, any doubt?

>bait
It's not. C is obsolete, and should die ASAP.

C is a disservice to intelligent programmers. It does not have features that a modern programmer would use in the industry and C++ provides all of them. C lacks many things and it's a poor language if you are not stuck in the 80's

There exist programs which are valid C and not valid C++.
Therefore C++ is not a superset of C.

I'm not even talking about trivial shit, either.
There are many important and useful features that are missing from C++.

>C is obsolete
For something to be obsolescent, something has to obsolete it. What makes C obselete?
If you say C++, you clearly have no fucking idea what you're talking about.

Get with the times gramp, C# is the future.

asm.js

>What makes C obselete?
C++
>you clearly have no fucking idea what you're talking about.
Where is C used these days again? Kernel dev? Microcontrollers?
C++ has restricted C to a very niche industry and I hope C dies out just like that. No wonder C's popularity is falling like no other languages

I'd love to learn C/C#/C++ but I have no idea what to program.

In a future where C# dominates, C has NO place to exist.

Except for a handful of very minor details, C++ is a superset of the C programming language.

>very niche industry
Are you saying those niches are not important? You're basically saying "C is obsolete but not obsolete".
C fits its niche so damn well, it isn't going to be replaced any time soon. C++ is utterly inappropriate for the things C is good at.

It's a lot more than you think it is. There are even many cases where they compile with the same syntax but have different semantics.

C++, if you really have to learn any of C or C++.
I'd suggest you start with D. It'll give you a rock solid foundation on programming. D itself is a re-engineering of C++ and as a language D is better than C++.

However learning C is just pointless in this age, I'd say otherwise in the 90's maybe when the hardware industry was not really competitive. I can understand why people are suggesting C though. C is a very small language that takes almost no time to learn. But in the long run C++ will be more helpful to you.

You are choosing language that is very large and hard also it has much less entry level jobs than C# or Java.

Also from financial side of job.

Hard job != good salary
market demand == good salary

C embedded programmer with 10 years of documented exp. will make much less money than java code monkey with 10 years of exp.

Writing in c or c++ is not making you a better programmer in any way, you will just loose your hairs faster fucking with dumb shit.

samefag shilling D. Can you program a kernel in D? Well, yeah, but no one does because it's shit.

>Are you saying those niches are not important?
No. By niche I mean niche. C has it's place - rare cases where you need to develop kernels. Developing kernels is important but it's only a rare fraction of the software industry.

Kernels can be developed in assembly too.

>It's a lot more than you think it is.
-No tentative definitions in C++
-No K&R function definition style
-Nested struct has class-scope in C++
-No default int
-No special handling of declaration specifiers in array dimensions of parameters
-No variable length arrays
-No flexible array member
-No restrict qualifier for helping aliasing analysis

Is that all? hahaha

Is OP going to develop a kernel? Dumb C tard fuck off.

Also
>Can you program a kernel in D?
Why are C tards so tech illiterate? Legit queston
github.com/Vild/PowerNex

I said you can, but no one does. And that one shitty kernel you suggested doesn't even support an OS. You're just proving my point here, please stop.

Most Sup Forums programmers are novice first year undergrads. C is easy to learn and Sup Forums probably has been able to learn C. Amazing how Sup Forums babbies live under a rock like that.

Sup Forums babbies hate anything but C because other systems languages are too hard for them

JUST FUCKING LOOK AT THE BACKPEDALING OF A C TARD

>no one does
>example given
"gee may be some space alien made that kernel"

Low IQ C tards are source of all the cringes

If we're talking about syntax alone, you missed designated initialisers, compound literals, _Generic and maybe a few others I'm forgetting off the top of my head.
There are also a shitload of semantic differences between the languages.
Automatic void * conversions, sizeof char literals, non-static inline functions, are a few that pop to my head. I'm sure there are dozens of small ones which could easily trip people up and lead to subtle bugs.
You also missed C's important feature of being easy to implement, its distinct "lack of features" (which is a feature in itself), it's unwillingness to cause an explosion of object code, it's stable ABI (this one is important), and so on.

function c() {
rm -rf .wild-cache PowerNex.iso Disk/boot/PowerNex.{krl,dsk} Initrd/Binary Userspace/lib {Kernel,Userspace/{Init,libRT,libPowerNex,Shell,Cat,HelloWorld}}/obj/
}
function v() {c && ./build}
function b() {v && qemu-system-x86_64 -cdrom PowerNex.iso -m 2048 -monitor stdio -serial file:COM1.log -no-reboot}
function a() {addr2line -e Disk/boot/PowerNex.krl $1}

Woah, that's so difficult.

C doesn't have Generics

Sorry, my bad.
>no one relevant does

For a C babby maybe. What are you trying to prove there with that block of code?

He is not backpedaling, its just your reading comprehension and attention span are at a level of a retard.

It has _Generic, which is a compile-time switch based on the type of the argument.

Learn to read, dumb fuck

That D is shit. A kernel written in it relies on the Linux command line LMAO
github.com/Vild/PowerNex/blob/master/env.sh

>D
>Systems language
>Garbage collected

see No one relevant uses D unironically

>Linux command line
.sh files are not "Linux command line" you computer illiterate C tard.

You ought to practice what you preach in this particular case.
You are embarrassing yourself.

But it's got rm -rf in which is LINUX. Fucking idiot.

If you don't need garbage collection you can avoid them, and there are instructions on how to do that

That is some incredibly weak justification.

>rm -rf
>"Linux"
Jesus christ are you actually baiting? What's so Linux about rm -rf? Fucking dumb shit?

What weak justification?

int main(string[] args) {
assert(args.length == 3);
auto pipes = pipeProcess(["sh", "-c", `readelf -W -s ` ~ args[1] ~ ` | grep "FUNC" | awk -F" " '{ print $2 " " $3 " " $8}'

LOL IT CAN'T EVEN DO THIS ITSELF IT HAS TO RELY ON LINUX HAHAHAHAHA

github.com/Vild/PowerNex/blob/master/Utils/GenerateSymbols.d

>IT HAS TO RELY ON LINUX
>LINUX
Are you actually dense or was right? First year?

>kernels written in D have to use Linux to do the legwork
Stay butthurt D shiller

>see grep and awk
>see rm
>see a .sh file
"it's linux guise"

For the fourth time:
What's so Linux about .sh?

Linux uses rm and grep and awk idk what it is but I'm pretty sure it uses awk too since the l shaped symbol moves the previous functions contents to it. I think it's std(main) --out?

looks just like actionscript. was it actionscript inspired or something?

Learn C first, and do a small but non-trivial project with it.
C is simpler to learn because it isn't as huge as C++. It will allow you to concentrate on pointer manipulation and memory management, which are things you will also need to tackle in C++, and are kinda tricky to get at first if you are used to a garbage-collected language.
Another reason to learn C before C++ is that a lot of C libraries are often used in C++ programs.
Once you are comfortable with C, you can learn C++, and you will get why C++ is a thing in the first place. Despite being a language hated by many people, classes, templates, smart pointers, etc, are all very useful additions to the C core of the language.
I wouldn't recommend to get "Accelerated C++" because it teaches C++98, which is outdated. Get "A Tour of C++" or "The C++ Programming Language" which include the former.
For C, two useful books to get are "Understanding and Using C Pointers" and "21st Century C".

C# can't compete with C/C++ if you need performance. It's all about using the right tool for the job.

More like
Unix uses, the kernel/src/ does not, in any way, relies on Linux, it's a different kernel

learn Rust, as good as C/C++ minus the bullshit

what

C has neither bullshit nor features. It's a tasteless POS. Might as well use assembly because everyone in the world has to develop his own kernel now according to C toddlers

yes, it has the same function calls. but action script has more advanced types, like String.
function sampleFunction():void{
var sampleVariable:String = "Hello, world.";
trace(sampleVariable);
}

>():void
>var sampleVariable:String
I don't see such things here Do you have autism?

Do you want memory exploits and security vulnerability in your program? If yes I highly recommend exploitlang (aka c).
Over the years c has managed to remain the mother of all security vulnerabilities and 0days.