On Sunday, 18 November 2012 at 21:21:12 UTC, Jonathan M Davis
wrote:
On Sunday, November 18, 2012 12:53:59 Walter Bright wrote:
There was a proposal to add modules to C++11, but it failed to
gather much
interest.
Honestly, it's the sort of thing that I would have thought
wouldn't even be
possible in C++, because it would require too much of a
redesign and would
break backwards compatibility. There a lot of things like that
in C++ which
are completely unfixable without breaking backwards
compatibility, and if
you're doing that, you might as well go all the way and create
a new language,
since there are so many things that should be fixed/changed
that it wouldn't
really be C++ anymore by the time that you were done (it would
probably be
something much closer to D). It'll be interesting to see how
they actually
implement a module feature.
I don't see what it would break, besides the pre-processor usage.
Modules mean that the compilers just need to read a symbol table
or an AST from an external file.
Also, I think that so many C/C++ devs are so used to the
compile times that
they get with them that it's nowhere near the top of the list
of features that
they want. It probably didn't even occur to many of them.
This is why so many developers with C and C++ only experience
think
Go compile times are great, when every developer outside C and C++
world has been having them for the last 30 years.
Not to mention, if
you think that fixing the problem isn't really even feasible
(and I have no
idea how it's feasible as long as the pre-processor or textual
inclusion is
involved), then it's definitely not going to be on the list of
things that
you're asking for.
- Jonathan M Davis
Easy, just do them the same way as Turbo Pascal/Delphi do it. If
you
really need to change the pre-processor values, then you need to
recompile the module anyway.
http://www.freepascal.org/docs-html/prog/progse1.html#progsu37.html
This is the same thing D requires, if the version() values
change, right?
--
Paulo