15 ms·
Ways to Get Better at C++
- doktrin 9y agoThis sounds like a lot of fun, but I'm concerned about the limited ROI. How many practical, modern use cases does Cpp have at this point for those of us who don't work in a few very specific verticals like finance or game dev? Even in those aforementioned industries, C++ is reserved for niche roles / use cases. Of course not all hobby projects need to be "practical" or directly useful - but time is a valuable resource and I at least would like to have an actual non-toy project goal in mind when choosing to better grok a language. What is C++ uniquely good for in 2017? edit : Useful answers to this question - * extending libraries for higher level languages * embedded dev
- zelos 9y agoA lot of embedded work uses C++ IME. There seems to be a reasonable demand for it from the job adverts I see.
- dom0 9y agoTBH it sounds like you immersed yourself in the "everything is node or go or rust" HN bubble. C++ is one of the most widely used languages for application development.
- doktrin 9y ago> TBH it sounds like you immersed yourself in the "everything is node or go or rust" HN bubble I find that when someone's made up their mind about me based on little to no data, there's not much point trying to prove them wrong. > C++ is one of the most widely used languages for application development What kind of applications?
- ajdlinux 9y agoAnywhere that deals in embedded development, you're going to have to touch C++ at some point.
- dom0 9y ago> made up their mind "sounds like" is very much the opposite of that. > What kind of applications? All of them, except web pages.
- doktrin 9y ago> All of them, except web pages. This is just factually untrue. Mobile, desktop, data analysis, machine learning and even games : neither are primarily developed with C++ these days. I imagine you're going to respond with snark about how game engines are written with Cpp, or mention some edge case where a CLR / JVM language needs to call out to native libraries - but there's no escaping the fact it's a niche skill set and one of rapidly diminishing importance to the overwhelming majority of developers.
- dom0 9y ago> Mobile development Android NDK, Objective-C++, ... > desktop applications There are plenty of applications written in C++, from legacy code bases like MS Office to almost all content-creation tools ever, most applications whose abbreviations contain "computer aided", many libraries, and boatloads of applications. Like I said, C++ is used practically everywhere. Most applications developed on Qt are C++ (some Python). Qt itself has already a large user base. > data analysis From matlab to gnuplot, oscilloscope and spectrum analyser software, data analysis applications are frequently developed using C++. > machine learning On many repositories I can rather clearly see a broad pink bar, e.g. https://github.com/search?utf8=%E2%9C%93&q=topic%3Amachine-learning+&type=Repositories https://github.com/search?utf8=%E2%9C%93&q=topic%3Amachine-l... https://github.com/tensorflow/tensorflow https://github.com/tensorflow/tensorflow - If some proprietary application is not obviously written in .NET or Java, C++ is a safe bet.
- doktrin 9y ago> Android NDK, Objective-C++ Those toolkits are only useful for edge cases. SDK performance is adequate for 95% of real world applications. > From matlab to gnuplot, oscilloscope and spectrum analyser software, data analysis applications are frequently developed using C++. I.e tools that don't need to be re-implemented, some of which had they been built today could easily have been written with a bytecode / JVM / CLR language. > On many repositories I can rather clearly see a broad pink bar, e.g. https://github.com/search?utf8=%E2%9C%93&q=topic%3Amachine-l https://github.com/search?utf8=%E2%9C%93&q=topic%3Amachine-l In your own link C++ ends up in a distant 6th place. What is that supposed to prove? That it's more popular than JavaScript in ML development? > https://github.com/tensorflow/tensorflow https://github.com/tensorflow/tensorflow Another tool I'm not re-implementing. You conveniently left out that all of their models are developed with Python - which is what 99.99% of developers interested in ML are trying to do.
- joshvm 9y agoIn terms of application development, cross-platform GUIs are a pain in virtually any other language, ignoring platform specifics like Objective-C or dot net. Ever tried to ship a frozen Python binary? Never again. It's a little like saying what are some good modern uses for Java? Then you remember that millions of people use Android every day. I work in computer vision and deal with hardware a lot, both embedded (micros) and 'higher level' (cameras, random optomechanics). You get drivers in C/C++, often dot net, and occasionally other languages. Sometimes you get lucky and someone's written a Python wrapper already, but most of the time it's faster just to use the C++ (otherwise now you have another library to maintain and keep up to date with the vendor - someone else can do that!). If you work in web development, it's easy to forget that you can't just write a backend in Python and then make it look snazzy with CSS and Javascript. It's one of the few areas where C++ doesn't have much penetration. That said, browsers are written in C++ (Firefox and Chrome, for example) and of course the web servers themselves (plus some C). The combination of C++ and Python is very powerful. Modern C++ is very easy to read and if you use the STL, you can write surprisingly compact code. I'm also a big fan of Qt for GUI development (plus the other bits you get with it).
- doktrin 9y ago> It's a little like saying what are some good modern uses for Java? Then you remember that millions of people use Android every day. Of relevance here, millions (or whatever) of developers need Java every day to build Android applications and all kinds of line-of-business applications all over the world You can't say the same thing about C++, even if developers build ontop of C++ tools. That is the very point I'm driving towards : not that Cpp isn't an important language or ubiquitous, but that 99% of developers don't have a realistic need for it in 2017. Yes, it's an important language - but only like 0.1% of developers actually have a good reason to use it. > If you work in web development Or mobile development, or game development, or desktop application development - i.e. the vast majority of apps that consumers actually interact with don't require much if any C++ development even if they rely on tools written with C++.
- lossolo 9y ago> You can't say the same thing about C++ I think most of what you write is based on your imagination about C++ instead of facts and the facts are different. There are millions of C++ developers on our planet. Read this: https://blogs.msdn.microsoft.com/zxue/2016/10/24/how-many-developers-use-c-vs-c-vs-other-programming-languages/ https://blogs.msdn.microsoft.com/zxue/2016/10/24/how-many-de... And those are only one IDE (Visual Studio) stats.
- kronos29296 9y agoMost competitive programming is done in C++. It probably will be in near forseeable future. This is because of speed and STL.
- mhtxhn 9y agoChrome, Firefox, Adobe CC, etc. Node requires V8, which is written mostly in C++. Remove C++ from software development and check what is still working...
- doktrin 9y ago> Remove C++ from software development and check what is still working... Remove opcodes & assembler from software development and check what is still working... See how completely absurd that sounds?
- deleted 9y ago[deleted]
- CogitoCogito 9y agoI feel like C++ interacts with Python very nicely and so if you're a Python programmer, learning C++ can be very useful. I use Python and common libraries (e.g. numpy) for most things and then write extensions in C++ if that portion of the code becomes a bottleneck. You can use pybind11 or boost::python to do this pretty easily (though I personally tend to use the cpython C api directly myself). I think this provides a very nice balance between programmer efficiency and machine efficiency. I wouldn't say that C++ is _uniquely_ good for this (C could be used as well as any compiled language that can expose a compatible C ABI which includes Go, Haskell, etc.), but I do feel like the addition of RAII and exceptions matches the Python paradigm quite well.
- dom0 9y ago> as well as any compiled language that can expose a compatible C ABI which includes Go I don't think that's true. Go only has a FFI to the platform's C ABI (cgo).
- CogitoCogito 9y agoI'm not sure what you mean by this. Haven't you had the ability to specify as C ABI with the standard golang compiler since 1.5? I don't believe you need cgo. Maybe I misunderstood your comment? https://blog.filippo.io/building-python-modules-with-go-1-5/ https://blog.filippo.io/building-python-modules-with-go-1-5/ As long as you specify the correct interface, Python will happily load your modules.
- dom0 9y agoDidn't know that. Thanks!
- cr0sh 9y ago> I feel like C++ interacts with Python very nicely and so if you're a Python programmer, learning C++ can be very useful. I'm currently taking Udacity's Self-Driving Car Engineer Nanodegree. Currently I'm on the 2 week "break" between term 2 and 3, which starts on July 6th. Anyhow, term 1 used Python (and various libraries of course) exclusively. When I signed up, I knew that at some point they were going to use C++ - so I was concerned if my system would need an upgrade (I use Ubuntu 14.04 LTS); but I was assured it would work ok. I was also concerned because I hadn't touched C++ since VS4 (ie - ages ago!) - and I was thinking "will I be able to do this - rusty isn't the word for my skillset in C++". Term 2 came around, and that's when reality hit - C++ was to be used almost exclusively thru the entire term. Fortunately, Udacity (as part of one of the lessons) gave us a free "preview" of a course they are developing to teach C++ (not sure if it will be free or paid) - and so I went thru that, and found that it was fairly easy! I suppose that my skills in other languages since I had last played with C++ (ie, PHP, Python, Java, Go, Javascript, etc) all worked to make it seem that C++ was "just another syntax". Granted, there are some things which I only barely grok (templates, for instance - but there are several others), but overall, I got things, and was able to successfully finish my projects and complete the term. Oh - and I had to upgrade my gcc compiler, and a host of other things - because the version of gcc wasn't C++ 11 - which of course is what they were using mostly. So I got to do some unspeakable things to my workstation (and basically fubar'd it so bad I can't do an upgrade any longer - not without some serious work, but I'll leave that to the end of term 3)... I guess what I'm saying here is that the experience on the Udacity course led me to the agreement with your premise; C++ isn't really that difficult to pick up the basics of if you already have Python (and maybe some other languages) under your belt. That said - I am looking forward to seeing what Jai brings, if it is ever released to the public...
- adgasf 9y ago> What is C++ uniquely good for in 2017? C++ is special because it combines two big ideas: - Zero-cost abstractions (you only pay for what you use) - High-level abstractions (OOP, lambdas, code-generation, etc. ) I would jump straight to C++ 17. It looks completely different to early 2000s C++ and makes functional programming easier (type inference, lambdas, constexpr, etc. ). If you learn to use C++ well, you will be able to write faster code faster.
- userbinator 9y agoZero-cost abstractions (you only pay for what you use) True in theory and essentially because C++ still remains mostly a superset of C, but unfortunately the majority of C++ programmers I've met tend to overabstract and not realise it, making this claim not really true in practice. High-level abstractions (OOP, lambdas, code-generation, etc. ) On the other hand, this is definitely true in practice.
- adgasf 9y ago> "C++ still remains mostly a superset of C" I think this notion is out-of-date. Have a look at this slide: https://youtu.be/_wzc7a3McOs?t=21m37s https://youtu.be/_wzc7a3McOs?t=21m37s It shows how C++ has evolved away from just "C with Classes". I agree that many C++ programmers over-abstract things.
- userbinator 9y agoIt shows how C++ has evolved away from just "C with Classes". I meant that C code, with few modifications, will basically work fine when compiled with a C++ compiler.
- slededit 9y agoThe way it works out in practice is people can develop at a high level, and then when its needed you can go back and refactor where necessary for perf. The average performance does become slower though.
- codebeaker 9y ago
- arethuza 9y agoI suspect that it is likely that the browser you used to post that comment was written in C++.
- doktrin 9y agoThat's correct, and if I wanted to write a new web browser designed to be performance competitive against the big 3/4 I wouldn't have asked this question to begin with.
- jasode 9y ago>How many practical, modern use cases does Cpp have at this point for those of us who don't work in a few very specific verticals like finance or game dev? I understand your reservations but keep in mind that the blog post is intended for an audience that has already bought into C++ programming and therefore, may want to improve their baseline C++ skills. It's not an an evangelism article to convince those not using C++ right now. That said, to answer your question directly... I think that programmers who require high-performance code with low-to-zero cost abstractions will self-select into C or C++ ecosystems. In other words, a programmer thinking about writing a web app to track food recipes isn't going to be perplexed about choosing "C++? vs Ruby? vs COBOL?". Like you hinted at, the domain of the app constrains what the programming languages will be realistically chosen.
- doktrin 9y ago> It's not an an evangelism article to convince those not using C++ right now. I get that. Maybe I should have added a disclaimer to that end. > In other words, a programmer thinking about writing a web app to track food recipes You're maybe the 5th person who's made thinly veiled barbs about me being one of those despised subhuman web developers, so I'll just answer this once and for all : Though I have written web apps in the past, I'm not really a web developer. What I am is a developer who builds shit that people use - be it desktop apps, mobile apps, games or web-apps. I don't give two shits if I'm using RubyScript or a goddamn magnetized needle : if I need the tool I'll happily learn it. My only problem here is I can't find a good reason to learn C++. That's all.
- quantdev 9y agoNo one is trying to convince you to use C++. Obviously the data show there are tons of C++ jobs and this is something you can google yourself. And finance is not a "niche", considering it's like 20% of the US economy. I'm in finance and I write high-performance simulations and pricers. These things need to be predictable, fast, and the code needs to be maintainable. And yes, despite what the prevailing Go or Rust bros say, modern C++ is maintainable.
- StevePerkins 9y agoAre you asking about the ROI in terms of professional career opportunities? Probably three orders of magnitude greater than it is for Rust, D, Haskell, Lisp... or any of the other flavor-of-the-month darlings that HN uses in their hobby projects, but for which few jobs exist in the real world. Are you asking about the ROI in terms of learning and personal growth? Then it's tremendous. The language that you probably are using (Java or C#) was written because most average programmers couldn't handle the power and flexibility of C++, so industry developed those languages as lookalikes with training wheels. If you've ridden a bike with training wheels your whole life, then aren't you at least curious at some point to see what it's like with them taken off? If nothing else, then you'll learn why decisions were made the way they were in derivative languages, and become a better programmer overall. It gives you certain amount of confidence to have experience in a language that most people are afraid of.
- LMYahooTFY 9y agoDo you think the suggested books in OPs link are accessible to me if I've only a couple of intro to C++ and Java under my belt? Universities are a much longer and unfortunately financially inaccessible route for me. Going to try the "build-a-portfolio-and-start-freelancing" approach.
- zerkten 9y agoIt's hard to know without knowing what your intro to C++ looked like, and what your background is. If you can get through Accelerated C++, then some of those books may be useful once you've gotten some practice. From http://www.ensisoft.com/temp/cplusplus_stack.png http://www.ensisoft.com/temp/cplusplus_stack.png (why is this a PNG and not a JPEG?), Modern C++ Design and C++ Template Metaprogramming are likely to be the most challenging. Don't get me wrong, they are fantastic works, but are probably not what you need right now. C++ Primer, C++ Common Knowledge, and API Design for C++ are books that I think you should consider that are not listed in the post above. If you have never studied computer architecture it is an important subject to understand. There are good books like Computer Systems: A Programmer's Perspective, but others may have different opinions.
- lin_lin 9y agoLet me guess, you're a web dev?
- doktrin 9y agoYou guessed wrong.
- GuB-42 9y agoC++ still tops performance charts, beaten only by C, while still offering high level abstractions. C++, along with C, which you should also know if you know C++ is also used in the embedded software industry. Because it C++ is still essentially C, you write code for these tiny, bare metal embedded systems and still take advantage of some advanced features like classes, templates, etc... Where I live, C++ coders are in high demand in various fields, just to let you know.
- doktrin 9y ago> C++ coders are in high demand in various fields, just to let you know. What fields, aside from embedded? I'm genuinely curious.
- GuB-42 9y agoJust an example of a job I did 2 years ago. It was for a company that did stuff related to digital signatures on official documents. The part that deals with smartcards is written in C++. They are mostly a Java shop, not C++, and that's why the called me. This is an example of "off topic" missions you can find. Personally, I mostly work around embedded/industrial systems and everything that goes with it such as test and simulation tools. I know some people who work in scientific computing and C++ is used in this domain too.
- dopple 9y agoHigh performance computing / supercomputing is dominated almost exclusively by C, C++ and Fortran.
- bstamour 9y ago* High performance/scientific computing * Graphics * Infrastructure (web servers and browsers, OS's, drivers, etc) * Any desktop apps that are CPU/memory intensive. think image processing, video editing, even office applications * Finance * Games * AI. GPUs are becoming more popular for training machine learning models, and C and C++ are pretty much dominating this space with OpenCL, CUDA, etc. You mentioned in previous comments that browsers and stuff don't really count because you're not going to be implementing a browser that competes with the big four. But people have to work on maintaining those browsers. Same with MS office, Photoshop, etc. The world pretty much runs on C and C++. From the steering column in your car to the computational fluid dynamics models that predict hurricanes and save lives, to the telephone switches that route your cell phone calls. Until pretty much every important piece of digital technology, small or large, switches over to a new language, there will be a need for C and C++ developers.
- maxxxxx 9y agoC++ may not be uniquely good for this but most desktop apps you are using are written in C++. When you add C all your operating systems are written in C/C+, most web servers and databases are.
- doktrin 9y ago> C++ may not be uniquely good for this but most desktop apps you are using are written in C++ I disagree. Most desktop apps are written with some kind of bytecode language (like my code editors and IDEs) with a few being written in C++ for very specific reasons (like my web browsers). > When you add C I wasn't asking about C
- maxxxxx 9y ago"Most desktop apps are written with some kind of bytecode language (like my code editors and IDEs) with a few being written in C++ for very specific reasons (like my web browsers)." That's maybe true for your Dev tools but not for general purpose apps. MS Office, Adobe products, video players and other stuff regular people use are written in C++.
- smelterdemon 9y agoWhether or not you find C++ uniquely useful for more general (e.g. desktop application) programming, it's still one of the most popular languages. There are lots and lots of legacy C++ codebases that are being actively maintained and updated. OTOH the places where C++ is especially well suited may be niche but they also tend to be crucial.
- doktrin 9y agoYeah I agree with this. It got lost somewhere in this shitshow, but I really was just looking for something to use C++ for : obviously I won't be contributing to a legacy codebase or applying for a job maintaining [insert critical software] built in C++ people have cited.
- maga 9y agoAsk HN: Do I miss much by skipping "Effective C++" and only reading "Effective Modern C++"?
- deleted 9y ago[deleted]
- joboccara 9y agoYes. Effective Modern C++ covers the new features, but doesn't repeat what is still valid and in use on the features that were there before.
- Suncho 9y agoYes. You miss a lot. Effective Modern C++ is not an update of the original. It's more of a supplement that covers the new stuff.
- Jare 9y agoAs others have said, both are great. Some bits of the first book may be obsoleted by newer language features, but will still give insight into why these features came to be. Also note, in my impression, Effective Modern C++ is pretty hard if you are not quite familiar with C++11 already.
- manaskarekar 9y agoIn addition to the other replies, you might end up working on a codebase that precedes C++11.
- w8rbt 9y agoI would say that this is very likely.
- zura 9y agoKeep in mind, Effective Modern C++ is not a good book to learn modern C++. You learn modern C++ (11/14/17) from other resources and then come to this book to read about quirks and corner cases.
- sb47906 9y agoBookmarked, thanks for this! You've covered books, course pages, tutorials and videos as learning resources. Do you have any audio/podcast recommendations with C++ material?
- joboccara 9y agoThank you! Well there is one podcast dedicated to C++: cppcast.com. Also I'll publish a post dedicated to books about C++ that shows more recommendations, during this summer.
- ensiferum 9y agohttp://www.ensisoft.com/temp/cplusplus_stack.png http://www.ensisoft.com/temp/cplusplus_stack.png Just replace that Josuttis's C++ standard library with C++11 version and throw in Mayers new effective book for good measure and you're all set
- mi_lk 9y agoSurely you are joking right? I just can't imagine one has to go through all those books to be proficient in one language.
- zelos 9y agoIf you read, understood and remembered all of those you'd be way beyond just proficient in C++.
- fsloth 9y agoOne is never proficient in C++. One merely... learns to adjust ones ignorance to practical constraints. I.e you choose such a subset that you can deal with it. But which subset? Hence, a shitload of books. The point is to read about all sorts of styles and pick whatever feels practical for you. And I'm completely serious. I've earned my living with C++ for over a decade, am considered a valuable contributor and still... so clueless towards so many details.
- lloydjatkinson 9y agoThen C++ has failed. If it has so many competing standards and subsets, then it is too fragmented. This is why when you see C++ written in one standard it looks like a whole other language when you look at other C++. If after a decade there are so many details still obscured from you, then that's pretty much again a fault of the overly-engineered and tacked on language called C++. Other mainstream language work fine and allow you to still write clean and modern code without having literally dozens of subsets and implementations. So why is it that C++ feels the need to have so many?
- 9y ago
- Allower 9y agoNo thanks, I'm not a masochist
- tapirl 9y agoit is easier to write fluent modern c++ code than read modern c++ code. The big obstacle of modern c++ is to communicate between c++ programmers.
- StevePerkins 9y agoCan anyone recommend a good compiler/IDE learning setup? I studied C and C++ back in university (I was in the wave of students that came through after they switched from Pascal as the teaching language, and before they switched to Java). And my first job or two back in the early-2000's was using C++ in HP-UX servers, to talk to other systems via CORBA. But that was ages ago, and once I stumbled into a Java job I never left. Every so often decide to scrape off the rust and check out C++ again, but the ENVIRONMENT setup scares me off. Should you use GCC or LLVM? If you're on a Windows box, do you try one of those? (there's at least three different distributions of MINGW available) Or do you use Microsoft's compiler? (VS has potential licensing issues, while the freeware build tools are pretty arcane and it's hard to even find an installer or know which exact thing to install) Or Cygwin? (I'm not 100% sure on the current state of its licensing) I've tried to build the wxWidgets library at least 100 times. It gives you dozens of options for compiler and environmental setup, and yet I've never found a choice that successfully built all the sample apps. Once you have a compiler setup, what about an IDE? (Don't even start with the "just use Vim or Emacs" crap, I'm not an animal!) I love IntelliJ in the Java world, but don't want to pay for JetBrains CLion just for hobby/personal use. The last time I tried Eclipse's C++ support it felt pretty half-baked. Qt Creator is actually really nice IDE (a C++ IDE should be written in C++!), but it feels very specific to writing Qt apps. What about build tools? It's hard enough for Java newbies to wrap their heads around Maven or Gradle. But makefiles and "configure" scripts are far more arcane, and which flavor of make should you be using in 2017? It's hard enough to build a project that uses one of these large frameworks with opinionated build systems. I wouldn't even know where to begin in combining two opinionated build systems as dependencies of a single project, or creating a new build system from scratch for a greenfield large project. Once you have a compiler, IDE, and build system and are ready to start coding, what about a standard library? Is Boost still the thing everyone uses? STL? Something else? I really can't imagine that learning C++ syntax is THAT challenging in comparison to Java/C#, Rust, D, or anything else. But I'd love to see an "Effective C++ Environment" book.
- pjmlp 9y ago> If you're on a Windows box, do you try one of those? No, I just use Visual Studio. If you don't want to pay for it, there is the Visual Studio Community edition available for free for personal use, which is basically Visual Studio Professional re-branded with a different license.
- zakirenish 9y agoGood advice on learning functional language, learning OCaml helped me a lot to advance my template meta-programming skills.
- bstamour 9y agoHaskell did the same for me.
- jnbiche 9y agoAs a non-C++ programmer with a background in functional programming, this similarity was a big surprise to me when I read a recent article on C++ template metaprogramming -- it's all basic functional programming techniques, with recursion, (kinda) pattern matching, etc. Very interesting! I could see how mixing templates with other C++ paradigms could quickly get messy in the wrong hands, since it's very powerful.
- deleted 9y ago[deleted]
- m712 9y agoI don't really see any advice here that's not generic.
- ryandrake 9y agoJust a nit pick for the author, take it or leave it: You use "STL" quite a bit through your blog, when you probably mean to say "C++ Standard Library". They are different beasts. You probably know the differences but beginners might not and could become confused. Otherwise, great article--that's a lot to dive into over a single summer though!
- deleted 9y ago[deleted]
- StephanTLavavej 9y ago"STL" is a perfectly valid way to refer to the C++ Standard Library through metonymy. Source: I am STL, an STL maintainer, with the sovereign right to name what I work on.
- ensiferum 9y agoCool to have you here!
- doe88 9y agoSo what are the best ressources for learning C++11/14/17 for someone who already knows the old C++ ?
- ksherlock 9y agoLook through http://en.cppreference.com http://en.cppreference.com and the libcxx source code - https://github.com/llvm-mirror/libcxx https://github.com/llvm-mirror/libcxx
- derekerdmann 9y agoEffective Modern C++ by Scott Meyers
- clishem 9y agoOne of the best technical books in existence (afaik).
- ot 9y ago> Improve your knowledge on Boost I might be extremely biased about this, but I can't not recommend to follow Folly as well (https://github.com/facebook/folly https://github.com/facebook/folly). There is some very good C++ there (and some bad C++ too), and it is generally more readable than Boost. Some ex-Boost people work on it too. The implementation of Function (https://github.com/facebook/folly/blob/master/folly/Function.h https://github.com/facebook/folly/blob/master/folly/Function...), for example, is mindblowing. I learned lots of tricks from it that I ended up using in a bunch of places. There's also a lot of interesting things happening in concurrent data structures under experimental/ (and the widely used MPMCQueue and LifoSem are also excellent).
- faragon 9y agoWay to get better C++: write code that everyone could understand.
- questerzen 9y agoSo I hate C++. What I really want is the speed, flexibility, universality and simplicity of C. But I wish structs had destructors, and a way to bind namespaced related functions. Only since I basically now have classes, I should really think about adding inheritance. And I also find prototyping, testing and non-speed critical programming is a pain without a good generic container library. Containers can be implemented fairly elegantly with templates, but then I probably also need some compile-time processing ability. Oh crap, I just ended up at C++ again. And so I persist with C++ as my main language, with a constant voice in the back of my mind saying, "this is just stupid, there must be a better way. Why is there SO g-d* much accidental complexity in this language?". In my view, C++ has probably wasted more programmer hours, and added more sadness and despair to the world (at the very least MY world) than any other technology. But given my language wish list it's very, very hard not to be tempted to fire up c++-mode for just one more hit.
- harrisi 9y agoOther than C, are there any languages that interest you? Are languages like Rust or D or other systems languages not what you're looking for? How come?
- questerzen 9y agoI use Python a great deal, especially for tooling and prototyping and appreciate the fact that programming is fast, easy and focused on the inherent complexity of the problem. Similar positive experiences with Smalltalky and Lispy languages as embedded languages. But I write a lot of performance-critical libraries for programs that need good C/C++ interop and where C++ is pretty much the lingua franca. Swift, D and Go, for example, all have their strong points, and I plan to do more experiments when I have some time ... after this one last C++ project, though!
- adamrezich 9y agoD? Nim? Jonathan Blow's upcoming language?
- geezerjay 9y ago