Just where has this language gone wrong?

Paulo Pinto pjmlp at progtools.org
Tue Jul 24 00:21:54 PDT 2012


>"Nick Sabalausky"  wrote in message news:20120723171909.00000527 at unknown...
>
>On Mon, 23 Jul 2012 22:51:19 +0200
>"Stuart" <stugol at gmx.com> wrote:
>
>> On Monday, 23 July 2012 at 15:56:37 UTC, Paulo Pinto wrote:
>> > Am 23.07.2012 14:49, schrieb Stuart:
>> >> On Saturday, 21 July 2012 at 22:16:52 UTC, Nick Sabalausky
>> >> wrote:
>> >>>
>> >>> C++ is living in the 70's.
>> >>
>> >> Precisely what I have been thinking. It's a loose wrapper
>> >> around
>> >> assembly, nothing more. Certainly not the "high-level language"
>> >> it's touted as.
>> >
>> > Only due to the lack of modules.
>> >
>> > Everything else is a pretty modern language I would say.
>>
>> Hardly. No RTTI. No GC. No properties. No events. No closures. No
>> extension methods. No interfaces. No writable references.
>>
>
>Null-terminated strings. Preprocessor. No reflection. Effectively
>undefined sizes for primitive types. Undefined behavior galore. Neither
>default initialization nor enforced initialization before variable
>usage. No reference types (Foo& isn't what I mean). Horrendous type
>syntax for mixed arrays/ptrs or functions ptrs, etc. No forward
>references (or at least very limited). And a grammar that forces
>compilation to be very, very slow.

Null-terminated strings are a consequence of C compatibility, which is very 
70's.
Nowadays I mostly use std::string or QtString, no null-terminated strings 
for me, unless talking
with C apis.

Preprocessor is quite handy as long as you don't abuse it.

Undefined sizes for primitive types is the only way to have a language that 
doesn't impose restrictions
on the target processor. D on the other hand is not able to target anything 
lower than 32 bits, if I understand
correctly.

Compilation slowness is true,  that was my complaint regarding modules. It 
all boils down to
the 70's compiler/linker model inherited from C, instead of the module 
system introduced by languages
like Modula-2 already in 1983.


>
>And a lot more still that's lacking if you don't count C++11 which
>isn't widely supported yet (ex: foreach, basic type inference).
>
>And the fact that static analysis tools are as super useful as they are
>is plenty proof alone that the language itself is WAAAY behind the
>curve.

This is valid for C as well.

My main point is that despite C++ issues it still feels very modern to me, 
specially
when you compare with what Go, a modern language from 2009 offers. I'll take 
C++
over Go any day.

But in the end I really miss that Turbo Pascal/Delphi lost the mainstream 
language game.

Luckly there are quite a few languages where their spirit lives on, C# and D 
being two of them.

--
Paulo




More information about the Digitalmars-d mailing list