Modules were introduced in the 70's as concept, Mesa being one of the first languages to use them, followed by CLU and ML....
The issue with lack of modules in C++, was that Bjarne had the compromise C++ should fit into C toolchains used by AT&T, and later all C shops.
EDIT: I get Rust is quite cool, but maybe a bit of programming language research is also welcomed.
I'm not sure if 'shares' is a typo or not, but it fits great with my impression of why companies choose the languages they do sometimes: everyone else uses it (it's the local culture/custom), and nothing/no one has forced them to change (by lowering their profits/share value).
There are YouTube videos....
Which in my mind matters more than all this pedantry.
All used in the context of systems programming.
Rust modules don't add anything new to them.
Those ideas are also present in Maven, Gradle, NuGet. All older than cargo.
And all trace back to CPAN as general concept.
I am still waiting for cargo to support binary libraries.
Nothing in Rust is original from PL theory perspective. It's deliberately not a research language, but a practical one. Rust set the bar here merely by showing up and delivering a decent implementation (in a language that you can actually use today).
Everything in terms of safety and modules was present in languages like Ada and Modula-3.
> A definition like this, where the choice of an implementation is dependent on dynamics, is entirely natural in object-oriented languages. Yet, it is not expressible with ordinary ML modules.
Here, ML modules are compared to classes (not packages or modules has defined in Java, for example). This makes me wonder how often people talk past each other without noticing, when they discuss modules.
https://en.wikipedia.org/wiki/Modular_programming
There are plenty CS books which offer a similar definition to Wikipedia.
We might have consensus about the definition, but it does not seem to be a useful precise one. The C++ working group seems to have a similar problem. Things like "compilation unit" have a precise meaning, but they cannot find consensus if it should relate to their "module" or not.
I think the issue is more with some C++ devs that never used other languages, trying to grasp how modules fit into translation unit + PCH model they know.
I don't think Rust deserves much praise for its module system. It is widely regarded as being extremely confusing even for pros. There are efforts underway to make it saner:
https://withoutboats.github.io/blog/rust/2017/01/04/the-rust...
No, it's mostly considered to be unintuitive, not confusing for people who know it. You're unlikely to "just get" how it works, but once you learn it it's perfectly reasonable.
Edit: Note that the RFCs don't actually change how the module system works, just the syntax
Anything else is mission creep at this point and risk delaying the effort further. Let's fix a problem at a time.
Google improved that implementation for C++ and has a private implementation of it in use.
Gabriel dos Reis picked up some ideas from a former work he did together with Bjarne for MSVC++.
The ongoing C++ Modules TS is to merge the ideas from both sides into what will become C++ Modules.
The history of modules you provided is helpful though, thanks.
...
> "We'll make the build systems understand".
This seems to be a critical point that I agree with: you can't divorce these two, their fates must be bound to one another. Hopefully the build systems can be easily modified to accommodate.
Rust community folks might be wrong about c++ but they're right about Rust. Rust had the luxury of not being bound to any legacy specifications and it wasn't unreasonable for them to write their own build+dependency/package management tool. The net effect of them having done that means that independent of all the other great things Rust brings, much of the tedium of developing with C/C++ is gone.
Make no mistake, C++ standard committee: the bar is high and Rust has set the bar.