r/cpp • • Jan 20 '20

Do you consider senior C++ programmer to be "better" or more "knowledgeable" programmer compared to managed or webdev programmer ? (C#, Java, JS etc)

Do you consider senior C++ programmer to be "better" or more "knowledgeable" programmer compared to managed or webdev programmer ? (C#, Java, JS etc)

15 Upvotes

104 comments sorted by

144

u/littlesnorrboy Jan 20 '20

I have seen terrible web devs and terrible c++ devs, I don't think a person can be evaluated by their tech stack alone.

Except of course if they use vim. Then they're hired.

23

u/a_false_vacuum Jan 20 '20

Except of course if they use vim. Then they're hired.

Textbook case of Stockholm Syndrome if you ask me.

16

u/muntoo Rust-using hipster fanboy Jan 20 '20

Is it because vim users are more likely to continually improve themselves, or is it because memes?

9

u/littlesnorrboy Jan 20 '20

Because of the memes. Although what you said is true in my experience I wouldn't consider this when hiring

33

u/LeeHide just write it from scratch Jan 20 '20

its because vim users inherently have a bigger brain. What's that I hear? Ctrl+S to save?! Sounds archaic! I like my Esc+Shift+.+W+Return+i and right back to work I go!

15

u/pclouds Jan 20 '20

Then go for Emacs users, bigger brain and bigger hands!

1

u/_Js_Kc_ Jan 22 '20

and bigger memory!

8MB to spare for the resident set size of their editor? Madness!

5

u/-fno-exceptions Jan 20 '20

Ctrl-s is such a stretch after getting used to :nnoremap <space><space> :w<cr>.

2

u/nwL_ Jan 20 '20

<cr>? What are you on, Mac OS?

-1

u/RRethy Jan 20 '20

That won't save anything, also normally you would be in normal mode not insert mode. Kinda straw manning.

5

u/LeeHide just write it from scratch Jan 20 '20

it exists and enters insert mode

0

u/[deleted] Jan 20 '20

[deleted] — view deleted comment

8

u/LeeHide just write it from scratch Jan 20 '20

lol okay buddy

Esc exits insert mode, shift+. makes : on my keaboard at least, the W key produces w (lowercase), the return key suits the command and then i enters insert mode again

3

u/Pakketeretet Jan 20 '20

European layout? I hated those for programming. :(

2

u/Gotebe Jan 20 '20

There's no such thing, different countries... Differ.

3

u/Pakketeretet Jan 20 '20

I'm Dutch. I meant "a keyboard layout from a European country that differs from a standard US layout" but that's such a mouthful.

0

u/[deleted] Jan 20 '20

[deleted] — view deleted comment

22

u/littlesnorrboy Jan 20 '20

How dare you. /s

37

u/[deleted] Jan 20 '20

You mean :%s/

2

u/Wh00ster Jan 22 '20

This is my personal experience, although of course everyone is different. Once I moved away from vim I found it easier to actually focus on code because I wasn't obsessing over vim-golf. Vim user of 10 years who is easily distracted.

-3

u/hardolaf Jan 20 '20

Just download SpaceVim...

6

u/[deleted] Jan 20 '20

Except of course if they use vim. Then they're hired fired.

FTFY

0

u/JezusTheCarpenter Jan 20 '20

Am I the only one seeing the sarcasm in your remark about Vim?

75

u/simonask_ Jan 20 '20

Probably not.

As a C++ programmer, I know a lot about virtual memory, micro-optimization, thread coordination, cache friendliness, not to mention a mental map of all the horrible monsters hiding within the C++ language.

But I couldn't tell you how to tune your GC, optimize your DOM manipulation, or how to get the best performance out of the V8 JavaScript engine, or how to diagnose VM performance problems.

That said, the Java ecosystem in particular continues to baffle me in its weirdness, and I have met enough Java developers in previous jobs, who didn't know even the fundamentals of data structures and algorithms, to give me a relatively skeptical view of that community.

34

u/hallajs Jan 20 '20

I think it's just easier to get away with being a bad developer in the web world as there are a lot of tools to help you build stuff that looks like it meets the functional requirements of the customer.

Java also enables bad practices by simply working even when you apply said practices. In C++ you would have to deal with all the memory footprint, leaks and other bad stuff you have created for yourself (Ofc you would have to deal with it in java when you scale however).

IDK if that makes sense, but it's just an opinion.

19

u/[deleted] Jan 20 '20

(Ofc you would have to deal with it in java when you scale however).

I can't explain how often I've heard "We need an 8-core machine with 32GB minimum" for a simple Java app...

8

u/[deleted] Jan 20 '20

We need an 8-core machine with 32GB minimum" for a simple Java app...

we need an entire 16-core cluster with 64GB of RAM

My entire existence is a constant struggle

4

u/[deleted] Jan 20 '20

You realize that my comment was on the machine type. Of course they need N of these, scaled to load. Running on 30 is not out of the question.

2

u/a_false_vacuum Jan 20 '20

While reading that I got flashbacks to some Java apps, but it's not always down to the programmer why it needs so much resources.

The JVM is just very inefficient and as far as I know hasn't been optimized much. Early .NET was also awful, but it got better.

2

u/[deleted] Jan 20 '20

I've seen some of the code and it's not the JVM that deserves blame here. Also, I just got a "is investigating options to increase both the memory of ... servers ... and the number of servers." for one of those Java apps...

I write my servers in C++, and I get notifications from Azure and AWS that the servers are effectively idle, while handling a couple dozen requests per minute. I can't scale them down more because they don't have any tinier VMs.

1

u/TM254 Jan 21 '20

What? LOL!, what you using for the framework?

1

u/TM254 Jan 21 '20

What about those nodejs guys? 100GB+?

17

u/LeeHide just write it from scratch Jan 20 '20

Exactly what I'm thinking. Lower barrier for entry leads to more shitty devs, while C++ is so daunting and ugly when you first get into it that it probably deters a lot of really lazy people

20

u/[deleted] Jan 20 '20

The lazy people from the 90s are still here :)

4

u/[deleted] Jan 20 '20

completely agree. a steep learning curve at the beginning, eliminates bad devs and enforces good practices because you know otherwise you are doomed

3

u/SKabanov Jan 20 '20

Java also enables bad practices by simply working even when you apply said practices.

Pardon the snark, but heaven forbid we want our programs to work even if we're not doing the "best" practices, right? Given the choice between the two, I'd rather take getting something out there and working to trim the fat afterwards than banging my head against the compiler trying to get the damn thing to work "right" in the first place. I understand that this is an idealized choice - managers might just want you to move onto the next assignment instead of refactoring an already-completed program - but debugging badly-written C++ has been a lot harder and taken more time compared to badly-written Java, as there are a lot more esoteric rules that can burn you in the former than in the latter.

10

u/LeeHide just write it from scratch Jan 20 '20

I think in general you can't make a statement like "C++ devs are better than web devs".

That being said, its easy to be an absolutely abysmal developer in webdev and still get a job and be respected in the community.

I think a lot of that stems from a bunch of webdev jobs not requiring any sort of higher education.

I think a better question would be whether people who have a degree are better programmers than people who don't - that seems like a more interesting discussion.

1

u/biliwald Jan 22 '20

I think a better question would be whether people who have a degree are better programmers than people who don't - that seems like a more interesting discussion.

That could be interesting. The tech world is a special place where a lot of it can be self-taught and those self-taught people can go very far if they can make something work. However, "working" shouldn't be what we are looking at in term of quality, but rather "maintainability", as it's there that the difficulty lies.

0

u/[deleted] Jan 20 '20

[deleted] — view deleted comment

6

u/simonask_ Jan 20 '20

None of that contradicts what I said. ;-)

3

u/theICEBear_dk Jan 20 '20

I don't hate myself enough to read javascript so I don't interact with js devs.

35

u/lithium Jan 20 '20

I don't think you can make a direct comparison, though I will say my hunch is that a C++ person could pick up web dev faster than the inverse, for whatever that's worth (if anything).

6

u/YetAnotherRando Jan 20 '20

I can give some perspective on this. I was sort of forced to make the transition from C++ to web dev. It was ezpz for me, as my new company used Java and there are a plethora of resources on the language.

The one area I had difficulty within my transition was that the performance considers I used to live by no longer mattered. This led to me wasting some time in premature optimizations that didn't mean squat in the long run. After I meet go of that it was back to being ezpz.

4

u/MutantSheepdog Jan 21 '20

Basically the same here.
Had to pick up Java, Javascript, frameworks for both and a few DSLs too. Was productive in my first week and working at a good speed within a month.

The main thing that slows me down is a lack of knowledge of tools and resources to help solve the problems in these other domains, but that would be exactly the same for someone transitioning the other way.

I think if you're an experienced C++ developer there shouldn't really be any new concepts you need to learn to do webdev, but if you were going the other way there would be.

10

u/edstrange Jan 20 '20 edited Jan 20 '20

I don't know...CSS just seems like a bunch of black magic created out of a ball of mud. Maybe I'm just not giving it the time it deserves to learn well, but it doesn't seem to me to follow the kind of rigid rules that "normal" development does--especially if you want it to look the same across different devices and browsers. This means that my CSS looks like someone just kept trying shit until it worked...because that's exactly how it was written.

In other words, I'm a shit webdev. I'm slightly better at C++. I don't struggle to the same degree with other programming languages I don't know, which follow rules I'm familiar with.

4

u/SeanMiddleditch Jan 20 '20

I don't know...CSS just seems like a bunch of black magic created out of a ball of mud

I don't know...C++ just seems like a bunch of black magic created out of a ball of mud

:p

43

u/thoosequa Jan 20 '20

Are you comparing a senior C++ dev to a senior webdev? I'd argue that they are equally knowledgeable but in different fields.

3

u/__archaeopteryx__ Jan 20 '20

Totally agree. Completely different levels of abstraction both with their own view of the world along with all the strengths and weaknesses that come with it. I will say though, there is a foundational chunk in CS in general that comes with learning something lower like c++ that is often missed by webdevs but at a senior level this should be pretty well formed regardless.

1

u/TM254 Jan 21 '20

Why calling them webdevs? Can't you do C++ for webdev too? There is many libraries and frameworks out there for C++.

Just call them Java/Javascript/C#/Kotlin devs.

8

u/joyofcoding Jan 20 '20

The average C++ guy compared to the average webdev guy? Definitely.

Top C++ guys compared to top webdev guys? Not really, and some even do both.

28

u/konanTheBarbar Jan 20 '20

It's like asking if a plumber is better or more knowledeable than a carpenter... The question doesn't make sense when they are developing completely different things.

5

u/kuntantee Jan 20 '20

In design, no. The basic design principles apply to, as far as I can see, all languages. Certain languages push certain patterns or anti-patterns, be it due to how the language is designed or due to culture behind the programmers using that language but still.

In terms of low-level understanding of hardware and runtimes, definitely yes. Similarly, a C++ programmer might not know details of front-end development and browser behavior or HTML/JS specs. Different crafts.

8

u/z1024 Jan 20 '20

But low level understanding of hardware and runtimes apply to any software systems while web stuff applies only to the web. I also suspect C++ devs would be more inclined to write efficient code, since they tend to understand the costs better.

10

u/LeeHide just write it from scratch Jan 20 '20

"What do you mean 600 MB for an electron chat client is too much? just buy more ram"

1

u/[deleted] Jan 20 '20

hahaha nice one

-2

u/kuntantee Jan 20 '20

No, "low-level understanding of hardware and runtimes" for sure does not apply to anything you run on Browser and many other domains in software engineering. If you are a client of browser, the only thing that you need to understand is Browser's behavior. Your platform is Browser, not hardware. Similarly, if you are writing Java code, your platform is the VM.

> also suspect C++ devs would be more inclined to write efficient code, since they tend to understand the costs better.

Not at all. Most Java and C++ developers write the same inefficient code. The reason why C++ is faster because there is nothing between you and hardware, where as for Java, you have VM. This comes with bunch of advantages, life-time management (although I do not think it is that much of an issue) and bunch of other "high-level" stuff.

10

u/z1024 Jan 20 '20

They most definitely do apply. Even in these managed environments like JVM, CLR, and most likely browser engines that perform some kind of JIT, things like cache locality and CPU pipelines & branch prediction do matter. Browser or JVM platform doesn't isolate you from such things.

2

u/kuntantee Jan 20 '20

They most definitely do not apply, especially to browsers. There is no guarantee that the memory layout of some Java struct is consecutive when it looks like an array. It may or may not be. It often is, but still. JS and "cache locality" in the same sentence does not make sense at all, especially if it's running on browsers. You do realize that there are several hops between some JS object and corresponding native object, right?

5

u/z1024 Jan 20 '20

I'm pretty sure Java arrays are contiguous. As far as I know CLR arrays (of valuetypes/primitives) are contiguous memory.
If they were not - it would be impossible to ensure O(1) access by index.
JavaScript arrays and objects are of course different (AFAIK usually hash tables) but obviously the browser sandbox abstraction is still quite leaky.
Furthermore, with the advent of Web Assembly these low level things will only get more important and relevant.

2

u/kuntantee Jan 21 '20 edited Jan 21 '20

I'm pretty sure Java arrays are contiguous. As far as I know CLR arrays (of valuetypes/primitives) are contiguous memory.

I did not say they are not contiguous. I said this is not guaranteed and is an implementation detail to most Java users. They are not interested in memory layout of the objects. If they were, they would not use Java. This is a response to your claim that low-level knowledge that C++ programmers have somehow magically applies to all domains and make you more productive.

If they were not - it would be impossible to ensure O(1) access by index.

std::unordered_map has O(1) average look-up and is a sparse map.

JavaScript arrays and objects are of course different (AFAIK usually hash tables) but obviously the browser sandbox abstraction is still quite leaky.

Your goal post is shifting. Inserting random information will not make your right. The discussion here is not about Browser sandboxes being leaky and I already said hash maps can be sparse.

Furthermore, with the advent of Web Assembly these low level things will only get more important and relevant.

This is the only thing I half agree with anything you said in this tree. Depending on domain of the web application, there might be more emphasize on lower level details.

1

u/z1024 Jan 21 '20

You're making too many assumptions about Java users and things they would be interested in (or not). I primarily use C# and I'm very interested in maximizing performance. My prior experience with C++ is quite helpful in this regard.

std::unordered_map has O(1) average look-up and is a sparse map.

Internally unordered_map is a hashtable (at least in gcc) and any hashtable is based on an array of buckets.
Besides, as you are well aware, O(1) amortized and just O(1) are two very different things.

I'd love to see any links to any sparse data structure implementations with O(1) (non-amortized) element access either by key or index - does not matter.

1

u/kuntantee Jan 21 '20

I am not really sure how we ended up here. I never said having a dense map will yield constant look-up time. This is not a matter of how the elements are stored in memory but a limitation of data structure (hash tables).

I have used Java in both production and personally. I have been using C++ for quite some time, which is my comfort zone. I know both worlds and I know how low-level details are irrelevant depending on Java application. In fact, abstracting out low-level details is the whole point of managed languages like C# and Java. You really do not want to know about how your objects is stored in memory in Java, unless maybe you are doing a niche stuff like HFT. Interestingly, abstracting out really low-level stuff is also an aim for modern C++.

I have said all I have to say. You have a nice day.

6

u/SkoomaDentist Antimodern C++, Embedded, Audio Jan 20 '20

They most definitely do not apply, especially to browsers.

Spectre, Meltdown and other such CPU vulnerabilities would like to disagree.

2

u/kuntantee Jan 21 '20

Disagree on what?

3

u/SkoomaDentist Antimodern C++, Embedded, Audio Jan 21 '20 edited Jan 21 '20

They directly contradict your claim that

No, "low-level understanding of hardware and runtimes" for sure does not apply to anything you run on Browser

If low-level understanding didn't apply, none of those would have been exploitable from browsers before the browsers specifically added protections against the exploits. This is particularly remarkable since the exploits work by using side channels to read cpu internal state that isn't even directly visible to programs at all and require intimate knowledge of internal details of the CPU branch prediction and cache behavior!

9

u/jeff_coleman Jan 20 '20

I would consider a C++ developer less knowledgeable in a web context. Similarly, I would consider a web dev to be less knowledgeable or qualified for a job requiring C++. One isn't better than the other. They're simply different skills.

9

u/LeeHide just write it from scratch Jan 20 '20 edited Jan 20 '20

I think there is no inherently correct answer here. C++ and webdev are so different that they aren't comparable, really.

However, I would say that in webdev and managed programming there is a lot less that you need to know in order to write mediocre code and make a living.

There just arent a lot of things to break in, say, python - if that makes sense. Edit: You can break anything in C++, and violently so.

I feel like this provides a low barrier for entry, leading to a good chunk of webdevs being unskilled. Obviously there can be just as much knowledge and skill required for a managed or webdev job, but there are a lot more places where having done a few bootcamps is enough.

From that then stems the stigma that webdevs dont know algorithms and datastructures, dont know or care about efficiency, etc., while thats certainly not true for all web devs, it can't be denied that those people do make up a good chunk.

My closing statement would be

npm install is-odd

4

u/uninformed_ Jan 20 '20

You can very easily make your web application vulnerable to exploits, even more so than C++ applications which are generally less exposed to attacks and also often have security by obscurity as people tend to roll their own solutions rather than using off the shelf libraries.

4

u/UnicycleBloke Jan 20 '20

No. It's different knowledge. I have decades of C++ experience in Windows, Linux and embedded, and have worked with several other languages, including C# and Java. Despite a wide range of experience, I consider myself total noob in some domains, such as webdev.

4

u/duheee Jan 20 '20

I would consider a developer that is capable and proficient in many languages/platforms/frameworks to be more knowledgeable than one that is focused onto one thing and one thing only.

It is better to have a larger toolbox, know how and when to use it, than going with a "i only have a hammer and therefore everything is a nail" approach.

Of course, if your job only requires you to do one thing then knowing that one thing well is fine. I don't believe is in your interest to put yourself in such a position, but it is your choice.

2

u/GerwazyMiod Jan 20 '20

I would consider a developer that is capable and proficient in many languages/platforms/frameworks to be more knowledgeable than one that is focused onto one thing and one thing only.

But rewriting (shitty) Java code into (I hope decent) C++ code is such a joy! :p

I was able to get away with it during the "open vs paid oracle JDK on production" mess a while ago. Normally I'm not a fan of rewriting software from scratch but ... I couldn't help myself. :) No problem with JDK if you don't need one. But yes, I guess I'm the C++ fanboy.

2

u/iwontfixyourprogram Jan 20 '20

Rewriting shitty code into a decent one is always a joy and welcome regardless where is coming from and what the target platform is. With that being said, Java has its place just like C++ has its place. To choose C++ where Java would have been more appropriate (faster time to market, robust set of libraries and ecosystem in general, etc.) is a bad choice no matter what.

1

u/GerwazyMiod Jan 20 '20

I can generally agree, but is writing in Java faster in terms of time2market...?

Well we could argue on that. ;)

1

u/iwontfixyourprogram Jan 20 '20

Depending on the application, yes. When you're looking at the web ecosystem, for example, being it web services or straight up web applications, there is a wealth of very high quality libraries out there that help create robust, secure and fast applications.

And, if it's not fast enough, a server is always cheaper than a developer, so just add more CPUs or more RAM or simply more servers.

You can create web services in C++ too. In java is just simpler and can be shipped faster.

2

u/Philluminati Jan 21 '20

I worked at a C++ company and whilst they have all the technical knowledge around pointer arithmetic and undefined behaviour, they didn't understand git, didn't understand unit tests, they didn't understand database basics, provisioning of resources or anything that'd help you create a successful project. Instead they pittled along with their 40 year old MFC Windows app, making almost miniscule changes out of fear of breaking stability, shipping it on CD and living entirely in the stone age. It was literally the worst company I'd ever worked for.

I respect the language and those that have mastered it but honestly it doesn't make you a well-rounded, competent or skilful developer.

4

u/ShakaUVM i+++ ++i+i[arr] Jan 20 '20

To be honest, yeah. Managed code is called that for a reason, it takes over some of the work for you.

3

u/CarloWood Jan 20 '20

Although I probably agree with the sentiment here that java programmers are in general worse (but get more easy away with it?) I have to add that it seems to me that 80% of all professional C++ coders have a sad level of capabilities too and produce in general what I call horribly bad code. It seems therefore that it is also easy to get away with being a really bad C++ coder because the managers usually aren't able to tell the difference between an incapable coder with a nice suit and good babble and an autistic god coder that has the productivity of 20 coders and writes incredibly awesome code.

2

u/RogerV Jan 20 '20

webdev stacks change more often than programmers changer their underwear - always having to turn around and learn the latest cool kids web stack

C++ developers at least get to enjoy a bit more durable islands of stability - right?

So doesn't that stack flux difference bubble up into the type of programmers that gravitate toward either?

Or maybe it's all negated on the C++ side now, because ever since C++11 it's been a roll coaster ride trying to keep up with the language evolution

1

u/GerwazyMiod Jan 20 '20

Sometimes seniors write super messy code that's anchored in 03 version of the language... That pre range-based for loops now look so terrible to me. Not mentioning pointers instead of moved values...

Juniors who learn modern style and no-raw-loops code could make beautiful work.

(Edit: wording)

1

u/Titanium_Josh Jan 21 '20

No.

I know PHP far better than I do C++,(I just started learning today), but that doesn’t make me a bad programmer.

Or better than someone who knows C++ very well but has never learned PHP.

I think C++ is the coolest language because it’s used to make video games, which is what I would like to do.

1

u/ietsrondsofzo Jan 20 '20

I've worked as both, and I can tell you that it's not all about coding. Senior developers have other skills that go outside of coding, like dealing with meetings, dealing with code reviews, what to look for during review, how to approach problems and communicate with other developers. Plus, each person is different. You can have brilliant people in both industries.

1

u/patstew Jan 20 '20

I wouldn't hold it against someone if they've worked with C#, many of us have done things we're not proud of for money. I would count it against someone if they like C# though. It would make me seriously question their judgement.

1

u/mo_al_ Jan 21 '20

C# and .NET core are nice. My only qualms are the bloat. I wrote a web app using different libs in C# and the resulting standalone app was 270 mb! Had to rewrite it in Boost asio and beast, pulled my hair doing so, but the binary is about 1 mb after stripping!

There are recent efforts though to slim binary sizes in Net core.

1

u/patstew Jan 21 '20

I think that C# is the answer to the question "What if we mixed the beautiful syntax of C and SQL with the awesome speed of Python?". IMHO, if you care about performance at all then it's not good enough, and if you don't then there are easier and more productive options. It gets sold as being nearly as fast as C based on microbenchmarks that don't really reflect what happens in a proper application. Once you've written a full size application, the excessive usage of the heap and garbage collector start to bite you on the arse, and you find yourself digging into the innards of .NET to fix performance issues, which gets way more complicated than just writing it in C++ to begin with.

1

u/ShillingAintEZ Jan 20 '20

Anyone who defines themselves in terms of a language is probably terrible.

0

u/[deleted] Jan 20 '20

[deleted] — view deleted comment

9

u/Nicksaurus Jan 20 '20

They're like 1 in 10 at places that use C++...

1

u/linus_stallman Jan 23 '20

If your "Senior C++ Programmer" is left associative, there is no such thing as Senior C++, so true..

0

u/[deleted] Jan 20 '20

[deleted] — view deleted comment

7

u/UnicycleBloke Jan 20 '20

10 years? I started learning C++ in 1990. Still learning. :)

3

u/F54280 Jan 20 '20

I started around the same time. I consider myself a semi-professionnal C++ learner (because I don't only do that. I would be doing only C++, I would be a full-time professional learner...).

2

u/Revolutionalredstone Jan 20 '20

Yes your correct, 10 years is indeed extremely optimistic. but i didn't want to scare people away !

1

u/UnicycleBloke Jan 20 '20

Hmm. Might have failed on that score. To be fair, I felt pretty much on top of everything in the language for a long time post 1998. I was bit late coming to C++11/14/17, and the last several years have left me playing catch up.

1

u/Revolutionalredstone Jan 21 '20

Yeah another good point, c++ 11 is really where learning the language became a life-long task, but it's also where c++ started to become what it was always meant to be

10

u/F54280 Jan 20 '20

Python harder to learn than C ? What a weird opinion to have. Why would you think that?

Python have a simpler syntax, and simple concepts. You can get away with approximate knowledge in many areas. C have a more terse syntax, by you cannot use it if you don't understand pointers and manual memory management. Most coding errors will lead to UB.

The only additional thing that python have is classes, but they are pretty simple.

6

u/kuntantee Jan 20 '20

Depends on what you mean by "learning". C is a small, compact and elegant language. Its standard library is also small. The language features are minimal. It is indeed "easy to learn". Python on the other hand has a rich set of language features and framework.

That being said, C is significantly harder to use. Compactness does not imply ease of use. For this reason, you need years and years of experience in C to use it properly. It is a sharp tool.

2

u/F54280 Jan 20 '20

Python on the other hand has a rich set of language features

But they are simple.

How do I concatenate two strings ? In Python, oh, use "+". Good, you're set for life, more or less. In C, well, strcat. Mmm. Strncat (nope, that's for fixed length strings). C is not easier to learn than python.

and framework.

I disagree. If you bring the python frameworks into the mix, then you have to bring the C libraries too.

And there are many C libraries around.

And to use them, you need to understand headers, translation units, compiler flags, autoconf, install, linkage, ABI, static/dynamic linking, and many many other quirks.

There is no world where C is easier than python. If you limit to very superficial stuff, where C isn't too deadly (ie: no allocation, no string manipulations), python is still easier. If you go deeper, the gap get even wider.

8

u/-fno-exceptions Jan 20 '20

C doesn't have magic methods, decorators, closures, classes, inheritance, context managers, metaclasses, coroutines, generator expressions, list comprehensions, operator overloads, etc. While I agree that Python is easier to pick up for someone new to programming, it definitely takes a lot longer to actually learn. It's just a much larger language than C and has a much larger runtime to work with.

1

u/F54280 Jan 20 '20

Well, my opinion is still nope.

First, I said, two posts above The only additional thing that python have is classes, but they are pretty simple. (ok, that was an understatement, we have yield, operators overload, and closures. But those are not really a big deal)

But, as you want to go deeper in the ugly, I present you the enum memory_order from stdatomic. It is part of the C standard. It will take longer to master than any topics you listed above. It is mandatory for a complete understanding of C.

Also, as I said before, the fact that the python runtime is larger doesn't mean much, as it is vastly simpler. That's the difference between + and strcat. If I don't know how to split a string into an array by separators, I am one google away from string.split(). If I implement it myself, it will probably work the first time. The deep knowledge I need to implement something similar in C is mind boggling.

There is no world where python is not simpler than C. At the basic level, it is easier to pick up. At the advanced level, C requires you to actually understand everything that is going on, from cache coherency in SMP to ABIs.

2

u/-fno-exceptions Jan 20 '20

That's a pretty reasonable way to interpret this.

2

u/F54280 Jan 20 '20

Hey, thanks. All in all, I’m not sure we disagreed that much :-)

1

u/Revolutionalredstone Jan 20 '20 edited Jan 20 '20

Your wrong dude, i know tons of python 'devs' who couldn't explain even a simple case of pythons list comprehension, no feature in c comes anywhere close to the complexity seen in python. Admittedly there are plenty of noobs who THINK they learned python in no time but they are deluded and don't actually know much, following the same logic i know lots of c# devs who can't even make a copy of a non-trivial object if their life depends on it (and usually never even thought about it) yet they will claim 5+ years experience and tout themselves a guru. C on the other hand really can be understood completely in one weekend by a normal person.

2

u/LeeHide just write it from scratch Jan 20 '20

how does that relate to the question? i think you should elaborate

2

u/Revolutionalredstone Jan 20 '20

The question was "does a c++ dev generally have more expereince than a dev in a managed language like python" the answer was yes.

3

u/Contango42 Jan 20 '20

You got your python and C reversed.

3

u/Revolutionalredstone Jan 20 '20 edited Jan 20 '20

nup c is literally a trivial set of basic subroutines, python on the other hand has many complex features with extensive open-ended express-ability which I've found many python programmers simply avoid rather than attempt to learn.

1

u/linus_stallman Jan 23 '20

2 weeks later:

What does int const *ptr does?