From: Mathias Gaunard on
On Jul 6, 8:27 pm, Walter Bright <newshou...(a)digitalmars.com> wrote:

> C++ const falls short in 3 areas:
> <const doesn't work for compiler optimizations>

I don't think "it falls short" is the right thing to say. It was
simply not made to represent physical constness of objects in memory,
but rather logical constness.
The type system enforces const so as to enforce the program is self-
consistent with its logic, not to enforce it doesn't write to memory
it said it wouldn't.


--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

From: Mathias Gaunard on
On Jul 10, 7:58 pm, Andre Kaufmann <akfmn...(a)t-online.de> wrote:

> Comeau online also complains about:
>
> error: "auto" is not allowed here
> auto compose(F1&& f1, F2&& f2)
>
> But it's a rather new standard, so no wonder that multiple compilers
> "think/interpret different" ;-).

It's not "think/interpret different", it's "not implemented yet".

>
> It's also a good example, that the verbosity C++ forces us to use is
> contra productive regarding portability.
> IMHO the more complex the code is, the more problems you get regarding
> portability (between compilers and platforms)

That's C++0x. Of course you're going to have problems if you use a
compiler that is lacking the C++0x features it uses.


--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

From: Andre Kaufmann on
Walter Bright wrote:
> Andre Kaufmann wrote:
>> In other languages there aren't problems too, I think in C++ we are just
>> used to this model and think it's just the best.
> I think it's true of all languages that once you get really used to it, it becomes hard to imagine doing things any other way.

I think it's true for the whole life ;-).

Additionally it's not only, that it's hard to imagine doing things any other way, but that there might be some more efficient ways to do it.
And even if there are more efficient ways, I have the feeling, that in
C++ they wouldn't be used, because most of them surely will break compatibility.

C++ modules however mustn't necessarily be 100% compatible (and can't), but I think that even in this context not that much of C++ will be changed, since that would mean 2 separate and different C++ languages in 1 single standard.

Andre

--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

From: Andre Kaufmann on
Walter Bright wrote:
> Mathias Gaunard wrote:
>> On Jul 8, 2:16 pm, Walter Bright <newshou...(a)digitalmars.com> wrote:

> [...]
> On windows, seg faults are catchable as C++ exceptions.

Do you mean the "bug", where it was possible to catch C++ exceptions, if structured exception handling was enabled for an older version of VC ?

Under Windows7 / Vista it's quite hard to catch a structured exception caused by an access violation (seg fault) and convert it to a C++ exception.
Normally the application is terminated and WER (Windows Error Reporting) is launched to send a dump file to a central storage.

Andre


--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

From: Dragan Milenkovic on
On 07/11/2010 04:49 PM, George Neuner wrote:
> On Sat, 10 Jul 2010 13:02:44 CST, Mathias Gaunard<loufoque(a)gmail.com>
> wrote:
>> On Jul 8, 4:37 am, George Neuner<gneun...(a)comcast.net> wrote:
[snip]
>>> Sorry, but you are misinformed. ABIs are register level function
>>> linkage specifications
>>
>> The register-level part, that is architecture-specific, is not the
>> problem. This is taken care of by the C ABI anyway.
>
> And again you are wrong. The "C" ABI specifies only that the caller
> save any registers it needs preserved and that local variables for
> which the addresses are taken reserve an actual memory location.
>
> Nowhere is it specified how many or which registers to use, where
> return values should be placed or where non-register local variables
> should be placed. These things are established by convention of
> developers in accordance with the ISA for each architecture.

How can it then be called an "interface" if it doesn't specify
how one piece of code should call another?!? It's just not right
and such an "ABI" would be useless.

--
Dragan

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]