Why is `scope` planned for deprecation?

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Mon Nov 17 18:35:05 PST 2014


On 11/17/2014 3:15 PM, "Ola Fosheim Grøstad" 
<ola.fosheim.grostad+dlang at gmail.com>" wrote:
> Ok, but I would rather say it like this: the language C doesn't really provide
> strings, it only provides literals in a particular format. So the literal-format
> is a trade-off between having something generic and simple and having something
> more complex and possibly limited (having 255 char limit is not good enough in
> the long run).

The combination of the inescapable array-to-ptr decay when calling a function, 
coupled with the Standard library which is part of the language that takes char* 
as strings, means that for all practical purposes C does provide strings, and 
pretty much forces it on the programmer.


> I think there is a certain kind of beauty to the minimalistic approach taken
> with C (well, at least after ANSI-C came about in the late 80s). I like the
> language better than the libraries…

C is a brilliant language. That doesn't mean it hasn't made serious mistakes in 
its design. The array decay and 0 strings have proven to be very costly to 
programmers over the decades.



More information about the Digitalmars-d mailing list