Live data from Hacker News

Are We Modules Yet?

arewemodulesyet.org

71–80 of 94 posts

Re: Are We Modules Yet?

#71

I've been working professionally with c++ since 2001, and I'm currently a team lead. The compensation packages we are able to offer to new hires means we're generally hiring from the middle of the talent pool, not the upper tier. The complexity of c++ has long since outpaced the pace of fluency of the hiring pool. In my experience, the average c++ professional (that applies for our open job ads) knows c++14, and migh…

Why not use them as soon as the compiler supports them? Your teammates will either ask you what it is (since you are the team lead), or look it up on cppreference.com.

Re: Are We Modules Yet?

#72
post #32

Earlier quoted context omitted.

C++ has long surpassed the point where mere mortals like me can understand it; It's so loaded with baggage, footguns, and inscrutable standards language that honestly I think the only thing keeping it going is institutional inertia and "backwards compatbility" (air quotes). I work extensively in the embedded space and unfortunately C and C++ are still pretty much the only viable languages. I can not wait until the da…

What's stopping Rust from being used in embedded?

Documentation is severely lacking and vendor specific libraries and build systems are sometimes interfering with cargo.

There‘s also the problem of rust-analyzer being relatively flaky in general and even more so when being used with environment specific / KConfig / build system feature flags that enable or disable certain library headers.

Re: Are We Modules Yet?

#73

Earlier quoted context omitted.

You know any other language that uses the header/cpp split likes C/C++ do? This is C++es way of finally getting rid of them, akin to Swift or Rust.

It's called putting all your code in the .h

Which is going to murder your compilation times. Modules do it better, the MS Office team claims the following: Worst case: 0.9% regression compared to PCH - Best case: 21.2% improvement compared to PCH

(From https://m.youtube.com/live/H6GQUg5JquU?si=1iC_OvRQ_MprzDTQ&t...)

Re: Are We Modules Yet?

#74
Silly question: What's the difference between C++20 modules and https://conan.io? (Google was vague, and ChatGPT, you know, sometimes makes things up so I rather ask fellow humans...)

(edit: Conan seem to address C++20 modules, seems to seek compatibility, but as a non CPP developer, not sure I read it right https://blog.conan.io/2023/10/17/modules-the-packaging-story...)

Re: Are We Modules Yet?

#77
post #11

for the wizards where would be a good place to start for someone who did a python bootcamp but wants to learn C++ and contribute to some of these?

I still like the Effective Modern C++ books by Scott Meyers, although they are a few years old already.

The modern parts of C++ are alright (inelegant and cumbersome, but alright), but because the language has grown over the years and best practices changed, it's difficult to see, which parts are worth learning as a newcomer.

That's why I like the books, mentioned above. They give concrete Do's and Don'ts, explain some important concepts like move semantics and why and how best practices changed.

Keep in mind, that these books require some preliminary knowledge, but you should be fine, if you learn the basic stuff from an online tutorial before going through the books.

Re: Are We Modules Yet?

#79

I've been working professionally with c++ since 2001, and I'm currently a team lead. The compensation packages we are able to offer to new hires means we're generally hiring from the middle of the talent pool, not the upper tier. The complexity of c++ has long since outpaced the pace of fluency of the hiring pool. In my experience, the average c++ professional (that applies for our open job ads) knows c++14, and migh…

It's a chicken and egg problem. You mention the average C++ programmer won't know the latest features, but if you did find an enthusiast who knew the latest features, you and the team probably wouldn't allow the use of those new features. I can't imagine a more soul draining job than maintaining a corporate C++ codebase. Talk about doing the bare minimum.

> I can't imagine a more soul draining job than maintaining a corporate C++ codebase.

Especially if most of the developers learnt Microsoft Visual C++ and believe that is proper C++!

Re: Are We Modules Yet?

#80
post #51
post #27

Earlier quoted context omitted.

For low-level compiled system applications: Rust, Zig etc. For compiled garbage-collected applications (web/cli): Go. For high-level applications (web/cli/etl/desktop): Java, C#. Also here is good writeup: https://hackernoon.com/the-real-c-killers-not-you-rust discussed here two times: https://news.ycombinator.com/item?id=34792932 https://news.ycombinator.com/item?id=39770467

But the fact that developers often need to be able to cover any one (or even multiple) of these areas, and that language proficiency (with platform APIs and various quirks) is quite hard to achieve - makes me think that the actual alternative is the elephant in the room, the one not even listed here: JavaScript.

Having been programming continuously on JavaScript for over 20 with all the popular frameworks, I'd try to stay away from it as much as possible:

1. Dynamic typing must die. Except for R/Julia/Python (aka JuPyteR) notebooks use-case, where it's awesome. My list includes only statically-typed languages. Typescript is much better, but its type-checking still fails sometimes, unlike real static-typed languages.

2. NPM is a mess that allows any transitive dependency to run arbitrary code on your machine at a time of installation (including cleaning up after itself). Compare that to Java's Maven -- libs quality is much better. no arbitrary code runs, just downloading.

Post reply on HN