Discussion:
[std-proposals] Why module is module?
i***@gmail.com
2018-11-30 19:45:44 UTC
Permalink
Some people do not like fact that `module` will be keyword (because it will
clash with existing names).

One solution is p0924r0 where it will make context sensitive.

But we could choose different name too (that are less likely to clash). Eg.
begin_module X;
start_module Y; //or
export_module Z; //or
module_unit W; //or

It will be bit more to type but this will be done only couple of times per
file (and in many cases done by IDE).

Why this approach was not taken?

Another way could be add `using`:

using module X;
export using module Y; //and

But this could be read as `import` similar to how we using `using namespace
Z;`
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+***@isocpp.org.
To post to this group, send email to std-***@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/d9cdd3db-8372-47b1-a8b4-f98bf6136b63%40isocpp.org.
Klaim - Joël Lamotte
2018-12-01 14:13:57 UTC
Permalink
My understanding is that the issue have been solved by one of the
papers processed at last meeting,
making the module a context-specific keyword, in the module preamble
to be exact.
That's from memory, I' can't search for the exact paper and
confirmation right now.
Some people do not like fact that `module` will be keyword (because it will clash with existing names).
One solution is p0924r0 where it will make context sensitive.
But we could choose different name too (that are less likely to clash). Eg.
begin_module X;
start_module Y; //or
export_module Z; //or
module_unit W; //or
It will be bit more to type but this will be done only couple of times per file (and in many cases done by IDE).
Why this approach was not taken?
using module X;
export using module Y; //and
But this could be read as `import` similar to how we using `using namespace Z;`
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/d9cdd3db-8372-47b1-a8b4-f98bf6136b63%40isocpp.org.
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+***@isocpp.org.
To post to this group, send email to std-***@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAOU91ONQyQjf-QDUNH5rZ9C_vU%3DsSJJ6odGsgv4mMN4UqykxiQ%40mail.gmail.com.
Klaim - Joël Lamotte
2018-12-01 17:40:04 UTC
Permalink
Here is the paper that was approved: http://wg21.link/p0924
Post by Klaim - Joël Lamotte
My understanding is that the issue have been solved by one of the
papers processed at last meeting,
making the module a context-specific keyword, in the module preamble
to be exact.
That's from memory, I' can't search for the exact paper and
confirmation right now.
Some people do not like fact that `module` will be keyword (because it will clash with existing names).
One solution is p0924r0 where it will make context sensitive.
But we could choose different name too (that are less likely to clash). Eg.
begin_module X;
start_module Y; //or
export_module Z; //or
module_unit W; //or
It will be bit more to type but this will be done only couple of times per file (and in many cases done by IDE).
Why this approach was not taken?
using module X;
export using module Y; //and
But this could be read as `import` similar to how we using `using namespace Z;`
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/d9cdd3db-8372-47b1-a8b4-f98bf6136b63%40isocpp.org.
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+***@isocpp.org.
To post to this group, send email to std-***@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAOU91OP5R8g%3D0vaETqWwTeMWC6o_BT8rENy9WaS84s5jsTgiqQ%40mail.gmail.com.
i***@gmail.com
2018-12-03 20:41:08 UTC
Permalink
On Saturday, December 1, 2018 at 6:40:40 PM UTC+1, Klaim - Joël Lamotte
Post by Klaim - Joël Lamotte
Here is the paper that was approved: http://wg21.link/p0924
Post by Klaim - Joël Lamotte
My understanding is that the issue have been solved by one of the
papers processed at last meeting,
making the module a context-specific keyword, in the module preamble
to be exact.
That's from memory, I' can't search for the exact paper and
confirmation right now.
I'm aware of paper (even I mention exactly same number in my message), my
question was different.
Why in first place this exactly name was taken and when problems arise name
was not change to something else?
As less serious solution could use `_Module` :)

Overall I bit dislike another corner case in language. In long run better
would be if module was intruded by some unique keyword and not by special
case
(if you define variable with type `module` you get module unit).
Post by Klaim - Joël Lamotte
Post by Klaim - Joël Lamotte
Post by i***@gmail.com
Some people do not like fact that `module` will be keyword (because it
will clash with existing names).
Post by Klaim - Joël Lamotte
Post by i***@gmail.com
One solution is p0924r0 where it will make context sensitive.
But we could choose different name too (that are less likely to
clash). Eg.
Post by Klaim - Joël Lamotte
Post by i***@gmail.com
begin_module X;
start_module Y; //or
export_module Z; //or
module_unit W; //or
It will be bit more to type but this will be done only couple of times
per file (and in many cases done by IDE).
Post by Klaim - Joël Lamotte
Post by i***@gmail.com
Why this approach was not taken?
using module X;
export using module Y; //and
But this could be read as `import` similar to how we using `using
namespace Z;`
Post by Klaim - Joël Lamotte
Post by i***@gmail.com
--
You received this message because you are subscribed to the Google
Groups "ISO C++ Standard - Future Proposals" group.
Post by Klaim - Joël Lamotte
Post by i***@gmail.com
To unsubscribe from this group and stop receiving emails from it, send
<javascript:>.
Post by Klaim - Joël Lamotte
Post by i***@gmail.com
To view this discussion on the web visit
https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/d9cdd3db-8372-47b1-a8b4-f98bf6136b63%40isocpp.org.
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+***@isocpp.org.
To post to this group, send email to std-***@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/7a8fde63-330f-42e6-b4e6-47695158c463%40isocpp.org.
Nicolas Lesser
2018-12-03 20:46:08 UTC
Permalink
Post by i***@gmail.com
On Saturday, December 1, 2018 at 6:40:40 PM UTC+1, Klaim - Joël Lamotte
Post by Klaim - Joël Lamotte
Here is the paper that was approved: http://wg21.link/p0924
Post by Klaim - Joël Lamotte
My understanding is that the issue have been solved by one of the
papers processed at last meeting,
making the module a context-specific keyword, in the module preamble
to be exact.
That's from memory, I' can't search for the exact paper and
confirmation right now.
I'm aware of paper (even I mention exactly same number in my message), my
question was different.
Why in first place this exactly name was taken and when problems arise
name was not change to something else?
Because it's the most natural/obvious name to use to introduce a module.
Post by i***@gmail.com
As less serious solution could use `_Module` :)
_Static_assert already gives me headaches, no thank you.
Post by i***@gmail.com
Overall I bit dislike another corner case in language. In long run better
would be if module was intruded by some unique keyword and not by special
case
(if you define variable with type `module` you get module unit).
I disagree. In the long run it would be better if we use intuitive
keywords, and not some weird one. The current solution also gives us a way
to make it a real keyword in the future, without breaking backwards
compatibility. If we use some weird keyword, then we will never be able to
remove it.
Post by i***@gmail.com
Post by Klaim - Joël Lamotte
Post by Klaim - Joël Lamotte
Post by i***@gmail.com
Some people do not like fact that `module` will be keyword (because
it will clash with existing names).
Post by Klaim - Joël Lamotte
Post by i***@gmail.com
One solution is p0924r0 where it will make context sensitive.
But we could choose different name too (that are less likely to
clash). Eg.
Post by Klaim - Joël Lamotte
Post by i***@gmail.com
begin_module X;
start_module Y; //or
export_module Z; //or
module_unit W; //or
It will be bit more to type but this will be done only couple of
times per file (and in many cases done by IDE).
Post by Klaim - Joël Lamotte
Post by i***@gmail.com
Why this approach was not taken?
using module X;
export using module Y; //and
But this could be read as `import` similar to how we using `using
namespace Z;`
Post by Klaim - Joël Lamotte
Post by i***@gmail.com
--
You received this message because you are subscribed to the Google
Groups "ISO C++ Standard - Future Proposals" group.
Post by Klaim - Joël Lamotte
Post by i***@gmail.com
To unsubscribe from this group and stop receiving emails from it,
To view this discussion on the web visit
https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/d9cdd3db-8372-47b1-a8b4-f98bf6136b63%40isocpp.org.
--
You received this message because you are subscribed to the Google Groups
"ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/7a8fde63-330f-42e6-b4e6-47695158c463%40isocpp.org
<https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/7a8fde63-330f-42e6-b4e6-47695158c463%40isocpp.org?utm_medium=email&utm_source=footer>
.
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+***@isocpp.org.
To post to this group, send email to std-***@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CALmDwq1UFAA5aR-m8dabop_v%3D6sJjnvPtRQv0eFV8WoAvF4X_Q%40mail.gmail.com.
i***@gmail.com
2018-12-03 21:07:40 UTC
Permalink
Post by Nicolas Lesser
Post by i***@gmail.com
On Saturday, December 1, 2018 at 6:40:40 PM UTC+1, Klaim - Joël Lamotte
Post by Klaim - Joël Lamotte
Here is the paper that was approved: http://wg21.link/p0924
Post by Klaim - Joël Lamotte
My understanding is that the issue have been solved by one of the
papers processed at last meeting,
making the module a context-specific keyword, in the module preamble
to be exact.
That's from memory, I' can't search for the exact paper and
confirmation right now.
I'm aware of paper (even I mention exactly same number in my message), my
question was different.
Why in first place this exactly name was taken and when problems arise
name was not change to something else?
Because it's the most natural/obvious name to use to introduce a module.
Post by i***@gmail.com
As less serious solution could use `_Module` :)
_Static_assert already gives me headaches, no thank you.
Post by i***@gmail.com
Overall I bit dislike another corner case in language. In long run better
would be if module was intruded by some unique keyword and not by special
case
(if you define variable with type `module` you get module unit).
I disagree. In the long run it would be better if we use intuitive
keywords, and not some weird one. The current solution also gives us a way
to make it a real keyword in the future, without breaking backwards
compatibility. If we use some weird keyword, then we will never be able to
remove it.
But now we have weird syntax, not every `module x;` is module declaration.
This depend on context. On other thread someone said that module should be
easy to parse and now tool need to know C++ scopes to correctly parse file.
Previously it only need know tokenization of file (on similar level as
preprocesor).

I personally prefer weird keyword than weird syntax.
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+***@isocpp.org.
To post to this group, send email to std-***@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/db10a122-fe4d-478b-89ee-71d89376386c%40isocpp.org.
Loading...