Live data from Hacker News

Are We Modules Yet?

arewemodulesyet.org

51–60 of 94 posts

Re: Are We Modules Yet?

#51
post #27

Earlier quoted context omitted.

Which one would you recommend? My ideal C++ alternative would be something like Swift but faster.

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.

Re: Are We Modules Yet?

#52
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

Little reason to use Go here. C# is a much better language at allowing you to tactically write high-performance low-level code where it matters and relying on higher level abstractions when it's not (struct generics are just like in Rust allowing you to expend a little effort for achieving zero-cost abstractions, although not as convenient as just using objects everywhere). Go is inadequate, poorly typed, has abysmal…

With Go, I can easily cross-compile a statically linked binary for each of the major platforms.

You cannot do that with C#.

Re: Are We Modules Yet?

#53
post #43

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…

I haven't coded c++ professionally since a couple of standards ago. However, I believe that something like c++ modules can be picked up quickly even by "middle of the talent pool" devs, because it's a useful feature for them. What might hinder modules adoption, beside availability of the compilers, is the rest of the tooling ecosystem and the particular idiosyncrasies that most c++ projects have.

In every major project I've been involved in (and it's not terribly many, to be fair) things keeping us on previous versions were almost always libraries or other support software, rarely if ever was it the devs.

Re: Are We Modules Yet?

#54
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?

C++ is a big language compared to Python. Many those of us with years of C++ experience don't fully understand the power and complexity of modules, partially because so few libraries and compilers support them as shown by TFA.

I'd recommend becoming an expert in Python modules. How they're packaged, how they're referenced and installed by pip, etc. Then learn how headers and translation units work in C++. How templates operate is an important concept to understand. Jumping right to C++ modules without a deeper understanding of the C++ compiler or without a reference point for other languages' module concepts will only lead to confusion.

If you're totally new to C++, I'd actually recommend reading "The C++ Programming Language" cover to cover just to "know what you don't know" and then roll up your sleeves and get some experience with a hobby project.

Re: Are We Modules Yet?

#55
post #53
post #43

Earlier quoted context omitted.

I haven't coded c++ professionally since a couple of standards ago. However, I believe that something like c++ modules can be picked up quickly even by "middle of the talent pool" devs, because it's a useful feature for them. What might hinder modules adoption, beside availability of the compilers, is the rest of the tooling ecosystem and the particular idiosyncrasies that most c++ projects have.

In every major project I've been involved in (and it's not terribly many, to be fair) things keeping us on previous versions were almost always libraries or other support software, rarely if ever was it the devs.

Really? For me, it has been almost exclusively management not wanting to invest the manpower necessary for the adoption.

If the technology stack allows it, I assume most passionate developers would develop rather with newer than older toolchains.

Re: Are We Modules Yet?

#56

As a longtime C++ user, I'd sooner just upgrade to a better system programming language. C++ is a weird mess.

And yet C++ is the best programming language.

If you had to pick only one language to use, for everything, you'd pick C++. It can do it all, from bit fields to polymorphic classes to closures; it's safer and saner than C (you haven't read the standards if you think otherwise); it's got a level of support and maturity (and probably lifespan) than any other comparable language.

Re: Are We Modules Yet?

#57

Earlier quoted context omitted.

Little reason to use Go here. C# is a much better language at allowing you to tactically write high-performance low-level code where it matters and relying on higher level abstractions when it's not (struct generics are just like in Rust allowing you to expend a little effort for achieving zero-cost abstractions, although not as convenient as just using objects everywhere). Go is inadequate, poorly typed, has abysmal…

With Go, I can easily cross-compile a statically linked binary for each of the major platforms. You cannot do that with C#.

Cross compilation story in C# is very good actually.

Re: Are We Modules Yet?

#58
post #7

Is it just me or does it seem like modules are a good idea which is totally dead on arrival? It's been four years, and we've had a whole new edition of c++ standard in the meantime, and Clang and GCC still don't have full support for modules.

The problem with most new features in the standard is that they are so complicated and tough to implement that it takes ages leading to the current situation where there are features already planned for c++26 while compilers barely support c++20. It's even worse that for embedded stuff it takes even longer for these modern compilers to be included in the toolchains etc. For example at work we are looking forward to b…

Yeah. Does gp not use C++? No new feature gets support in like less than 4 years. :p And I don't think that's a bad thing unless it's replacing a premature abomination feature released too soon, like `auto_ptr`. That's getting removed entirely soon; imagine if it were harder to do that because it got adopted faster and so much code relied on it that WG21 decided to keep it in "deprecated" limbo forever.

Also, we're on GCC 8! TnT '17 is the highest it can go.

Re: Are We Modules Yet?

#59

Earlier quoted context omitted.

With Go, I can easily cross-compile a statically linked binary for each of the major platforms. You cannot do that with C#.

Cross compilation story in C# is very good actually.

With Go, I can use my Linux CI server to compile a statically linked binary for MacOS.

Re: Are We Modules Yet?

#60

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…

Also looking at C++ every day isn't a very fetching proposition.

Yeah, I think grandparent is confusing "not knowing the language features" with "want nothing to do with the latest metaprogramming mess the cooks are serving". Job listings with C++ are a mess, you never know what level of insanity you are going to get (bonus shoutout for those that say "C/C++").
Post reply on HN