4 ms·
C++ is a fantastic language but it somehow attracts people with big ego. The smartest people I know would always try to simplify things, but many C++ developer
by bra-ket 6y ago
C++ is a fantastic language but it somehow attracts people with big ego.
The smartest people I know would always try to simplify things, but many C++ developers (especially in financial industry) have this preference for complexity I can't explain. And C++ is the worst language to get clever with.
- asddubs 6y agoit's not hard to see why C++ would attract people who revel in complexity, there's like 7 ways to initialize a variable, and they're all slightly different in certain contexts
- jdrek1 6y agohttp://mikelui.io/img/c++_init_forest.gif http://mikelui.io/img/c++_init_forest.gif
- MaxBarraclough 6y agoAnd to make things even more interesting, the rules change in subtle ways depending on the version of the language. https://stackoverflow.com/a/620402/ https://stackoverflow.com/a/620402/
- b0rsuk 6y agoI don't want to start a flame war, but what are some of the programming languages that attract the first variety of people?
- beagle3 6y agoI'm not sure what you mean by "first variety". If you mean "the people who like to simplify thing" mentioned in the GP, then it depends on your definition of simplicity more than anything. I'd say from my experience if a person prefers C to C++ or Java, that's a good indication - but it could also mean they learned C in 1990 and didn't bother learning anything else since.... From my experience: (apologies if this looks like a flame; purely personal experience, with no offense intended). - Python attracts all kinds of people. - Java attracts people who prefer rigid structure, specified down to minute detail (which non Java people will often consider unneeded bureaucracy) - C++ attracts people who like brain teaser challenges with lots of details and steps. The compiler is both their colleague and adversary in reaching the optimal speed goal (their "frenemy") - C attracts people with more experience who just wants "the simple thing that works" without giving up the low-level control that they would have to give up using e.g. Python or Java. - K/J/APL attract people who like brain teaser with short elegant solutions, even (and perhaps especially) if reaching and understanding that solution takes nontrivial effort -- which is basically also people who like math for math's sake. - COBOL attracts people who like job security, good income, don't care much about job satisfaction or recent advances made in the last 30-40 years, and want everyone to get off their lawn :)
- aviraldg 6y agoGo is the only example I know of (very explicit syntax, almost no "magic")
- Geminidog 6y agoI switched to C++ after years of doing web development in python, javascript and typescript, go and other high level languages associated with web dev. You're not wrong, the ego among C++ devs is astronomical. There's a huge amount of serious hate for python and this idea that being a C++ dev is superior. Get this we use Nix and C++ and the nix part of the code base is just as complex as the C++ code base. The nix stuff is just infrastructure! It's insane.
- mnw21cam 6y agoI'm primarily a Java programmer, but I had a go at learning Python a little while ago. I couldn't stand it - it just seemed so sloppy and poorly-defined. I don't consider myself as being superior to Python devs or having an astronomical ego, but Python-hate? Yeah.
- paganel 6y agoI got myself my first job as a Python programmer 15 years ago by (among other things) mentioning this blog entry: "Python Is Not Java" [1] [1] https://dirtsimple.org/2004/12/python-is-not-java.html https://dirtsimple.org/2004/12/python-is-not-java.html
- epage 6y agoI worked at a large C++ shop (the kind that maintains a stdlib fork) and never saw them looking down at Python.
- julienfr112 6y agoI think that's common for people that have a higher vision and comprehension of computers, to respect other choices and other tools. I prefer linux, but win10 and ios are great in the domain they target. C++ is great tools when you want to be low level, like managing memory, python is another great tool when you don't want to or don't need to or don't have the time to. Hey, guess what, it can be the same person that write python and c++ code !! And he even can like both !!! And be good at both !!!
- 6y ago
- beagle3 6y agoC++ lets you "get things done" when the other tooling you need is your brain. Unfortunately, that might mean template metaprogramming that makes a compile take >50 minutes, and where any syntax error typo generates a 4000-line error message -- but for some people, being to use C++ to get things done is an intellectual reward onto itself. If you wanted to get the same performance from C, you'd sometimes need to write your own preprocessor/code-generator, and/or abuse the built in preprocessor, so you can specaialize. To get the same performance in Python you need to go down to C. To get the same performance in Java, you need to do stuff like what's mentioned in this thread (allocate 1TB of memory and disable GC, for example). The only place where this is considered acceptable and commonplace, is the C++ community, I guess a chicken-and-egg problem. In most places, you only need that performance in a small part of your pipeline - which in HFT teams will sometimes be done in FPGA or ASICs or NIC firmware. For those places, C++ is also often required, and network effects (and "impedance mismatch") often mean that it will get used for a whole lot more than where it's actually essential. C++ is not the only such community for algo trading, by the way - the K programming language enables fast yet incredibly short implementations, and thus tends to attract competitions in "how short can you get the fastest code" (aka code golfing) to manifest all over implementations. And personally, I'd much rather have a oneliner K brainteaser that does alot than a huge 100-line C++ template monster that does the same thing 10% more quickly.
- asddubs 6y agowell, at least there's also constexpr now which reduces some amount of need for template metaprogramming