Why don't other programming languages have ranges?
retard
re at tard.com.invalid
Tue Jul 27 08:29:58 PDT 2010
Mon, 26 Jul 2010 14:04:53 -0700, Walter Bright wrote:
> retard wrote:
>> Tue, 27 Jul 2010 04:10:14 +0800, KennyTM~ wrote:
>>
>>> On Jul 27, 10 02:42, Walter Bright wrote:
>>>> retard wrote:
>>>>> I think the Java/C# developers gave up X % of the execution speed to
>>>>> avoid hard crashes (exceptions instead of segfaults)
>>>> 1. segfaults *are* exceptions.
>>>>
>>>> 2. D offers a memory safe subset, and D's ranges and algorithms are
>>>> memory safe.
>>> Catching exception is easy, but handling (segfault) signal is a mess.
>>
>> Indeed, I'd like to know how you recover from a segfault without help
>> from an external processes.
>
> On Windows, it's fairly straightforward. I did it once as part of a gc
> implementation that would mark unmodified pages as hardware readonly. It
> would catch the seg fault from writes to it, log the page as modified,
> make the page writable, and restart the failed instruction.
>
>
>> Sometimes you know that some routine might fail once in a week, but the
>> program MUST run non-stop for several months. In Java you can achieve
>> this with exceptions. And you can also dynamically fix classes with the
>> class loader.
>
> Any program that attempts to achieve reliability by "recovering" from
> program bugs and continuing is an extremely badly designed one.
>
> http://www.drdobbs.com/blog/archives/2009/10/safe_systems_fr.html
>
> http://www.drdobbs.com/blog/archives/2009/11/designing_safe.html
>
> Sadly, it's a topic that has not penetrated software engineering
> instructional materials, and programmers have to learn it the hard way
> again and again.
But these are your articles with no cited sources about the software
methodologies. It seems like they're written afterwards to advertise the
features implemented in D. The contract programming only covers a small
runtime dynamic part of programming. There's no mention about automated
theorem proving. No word about exceptions nor sandboxing with virtual
machines. Why? Because these would make D look ridiculous.
How the web programming world works:
''I'm not a real programmer. I throw together things until it works then
I move on. The real programmers will say "yeah it works but you're
leaking memory everywhere. Perhaps we should fix that." I'll just restart
apache every 10 requests.'' -- Rasmus Lerdorf
It it widely accepted that web applications fail often. It suffices if
the developers are fixing bad code eventually, but the remaining parts
should work reasonably well. Either a process is restarted or exceptions
are used to catch small error conditions so the server could server
*something* . I'm talking about practical web applications, not X-ray
machines.
More information about the Digitalmars-d
mailing list