Why don't other programming languages have ranges?

Walter Bright newshound2 at digitalmars.com
Mon Jul 26 14:14:20 PDT 2010


Michel Fortin wrote:
> On 2010-07-26 14:42:54 -0400, Walter Bright <newshound2 at digitalmars.com> 
> said:
> 
>> 1. segfaults *are* exceptions.
> 
> At the processor level, yes. They're exceptions at the language level 
> only on Windows, which I'd consider 'implementation defined', so not 
> exceptions as far as the language is concerned.

They are exceptions in the sense that a condition required by the program has 
been violated.


>> 2. D offers a memory safe subset, and D's ranges and algorithms are 
>> memory safe.
> 
> That's more a wish than reality though. I have yet to see @safe applied 
> on ranges and algorithms. I'm pretty sure it'll require a couple of 
> adjustments to @safe. As it exists currently, @safe does not work very 
> well with templates and delegate literals.

While it's true that @safe hasn't been thoroughly debugged yet, the ranges and 
algorithms are still memory safe because they use the array paradigm rather than 
the unchecked pointer paradigm.


More information about the Digitalmars-d mailing list