News for hackers. Stuff that matters.
Re:Killing the C++ Modules Technical Specification by pjmlp on Wednesday October 11, 2017 @09:40AM (#15449641)
> the bar is high and Rust has set the bar.

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.

Re:Killing the C++ Modules Technical Specification by humanrebar on Wednesday October 11, 2017 @09:48AM (#15449702)
I think "the bar" is talking about languages a developer might write her next application in. Mesa and CLU aren't on the list. OCaml might be, depending.
Re:Killing the C++ Modules Technical Specification by pjmlp on Wednesday October 11, 2017 @09:56AM (#15449773)
Except Rust modules (which are the subject here) are anything but innovative, there are plenty of languages since Mesa, CLU and ML came to the world with equally or better module systems.
Re:Killing the C++ Modules Technical Specification by humanrebar on Wednesday October 11, 2017 @10:05AM (#15449836)
Who invented modules first is moot when you're picking the language to write your next project in. Just like who invented the assembly line is moot when you are shopping for your next car. "The bar" for a car isn't Ford because Henry Ford was innovative. People don't really care about any of that when evaluating their next choice.
Re:Killing the C++ Modules Technical Specification by pjmlp on Wednesday October 11, 2017 @10:09AM (#15449873)
So what has Rust brought into modules to set the bar that isn't already available in other systems programming languages, with exception of C and C++?
Re:Killing the C++ Modules Technical Specification by jacobush on Wednesday October 11, 2017 @06:02PM (#15453911)
Ok, I am bit harsh here, but for me there ARE no other systems languages except C, C++ and recently maybe Rust. I am also told, that in distant lands with strange and foreign customs, Ada is a systems language. (I don't know - no Ada missionaries have yet set foot on our shares and preached it to us.)
Re:Killing the C++ Modules Technical Specification by singingboyo on Wednesday October 11, 2017 @08:05PM (#15454632)
>no Ada missionaries have yet set foot on our shares

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).

Re:Killing the C++ Modules Technical Specification by jacobush on Thursday October 12, 2017 @04:17PM (#15460970)
It was a typo, should have been "shores". However, it was a brilliant typo - the powers that be have decided on Greenhill and ClearCase. And the people who decide these things seem to be closer to the share holders than they are to us coders, so Ada missionaries on shares is maybe what it takes.
Re:Killing the C++ Modules Technical Specification by pjmlp on Thursday October 12, 2017 @01:43AM (#15455908)
You would do yourself a favour to improve your CS skills regarding the history of computing, maybe you know, get to learn some interesting stuff.

There are YouTube videos....

Re:Killing the C++ Modules Technical Specification by vvanders on Wednesday October 11, 2017 @10:40AM (#15450132)
A really damn good execution.

Which in my mind matters more than all this pedantry.

Re:Killing the C++ Modules Technical Specification by pjmlp on Wednesday October 11, 2017 @11:02AM (#15450320)
In what sense do Rust modules provide a better execution over Ada packages?
Re:Killing the C++ Modules Technical Specification by zodiac on Thursday October 12, 2017 @03:57AM (#15456373)
If we define "the bar" as "people's expectations for what a useable module system looks like" you can set it without being novel at all
Re:Killing the C++ Modules Technical Specification by wyldfire on Wednesday October 11, 2017 @10:02AM (#15449818)
Note that I didn't mention innovation or novelty or originality. I just said that Rust "set the bar." To respond to your objection I'd just clarify by qualifying it better and refer to the "systems programming" or whatever domain C/C++ and Rust both belong to.
Re:Killing the C++ Modules Technical Specification by pjmlp on Wednesday October 11, 2017 @10:04AM (#15449834)
So then check modules in Modula-2, Modula-2+, Modula-3, Ada, Oberon, Oberon-2, Oberon-07, Active Oberon, Component Pascal, Turbo Pascal.

All used in the context of systems programming.

Rust modules don't add anything new to them.

Re:Killing the C++ Modules Technical Specification by AaronFriel on Wednesday October 11, 2017 @11:37AM (#15450589)
It adds an excellent packaging system and developer experience in the form of cargo, which is also a package manager for external modules. "The bar", I think, is taken to mean the combination of all of these features and their execution, not the idea of modules.
Re:Killing the C++ Modules Technical Specification by pjmlp on Wednesday October 11, 2017 @12:23PM (#15450929)
A packaging system is orthogonal to modules.

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.

Re:Killing the C++ Modules Technical Specification by jononor on Wednesday October 11, 2017 @10:26AM (#15450000)
Rust has not brought much new in terms of modules. It just has decent modules support according to established best-practice. The innovations are primarily around the borrow-checker.
Re:Killing the C++ Modules Technical Specification by pjmlp on Wednesday October 11, 2017 @11:05AM (#15450344)
That I agree with.
Re:Killing the C++ Modules Technical Specification by earenndil on Wednesday October 11, 2017 @11:20PM (#15455418)
There are plenty of widely-used languages that have modules and came well before rust.
Re:Killing the C++ Modules Technical Specification by pornel on Wednesday October 11, 2017 @06:22PM (#15454056)
You seem to be responding to a claim that Rust invented modules, but I think nobody said that.

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).

Re:Killing the C++ Modules Technical Specification by pjmlp on Thursday October 12, 2017 @01:52AM (#15455938)
Rust sets the bar with the borrow checker and safer concurrency.

Everything in terms of safety and modules was present in languages like Ada and Modula-3.

Re:Killing the C++ Modules Technical Specification by qznc on Wednesday October 11, 2017 @10:00AM (#15449796)
The word "module" has very different meanings. When I read about 1ml [0] I stumbled upon this:

> 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.

[0] https://people.mpi-sws.org/~rossberg/1ml/1ml.pdf

Re:Killing the C++ Modules Technical Specification by pjmlp on Wednesday October 11, 2017 @10:08AM (#15449860)
True, but there is an actual definition.

https://en.wikipedia.org/wiki/Modular_programming

There are plenty CS books which offer a similar definition to Wikipedia.

Re:Killing the C++ Modules Technical Specification by qznc on Wednesday October 11, 2017 @10:30AM (#15450027)
For Java, class, package and (Java 9 Jigsaw) module all fit the Wikipedia definition of module.

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.

Re:Killing the C++ Modules Technical Specification by pjmlp on Wednesday October 11, 2017 @11:22AM (#15450483)
The basic concept of module is having language support for code separation, with data/code hiding, compiler type checking across modules and optimally a binary format.

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.