Re: [RFC] Convert builin-mailinfo.c to use The Better String Library.
- From
Andreas Ericsson <ae@op5.se>
- Date
- Sep 8, 2007, 23:50 UTC
- Message-ID
- <46E3354A.7030407@op5.se>
- In-Reply-To
- <fbsbul$dg0$1@sea.gmane.org>
Walter Bright wrote:
Show 7 quoted lines
> David Kastrup wrote: >> Again, C won't keep you from shooting yourself in the foot. > > Right, it won't. A good systems language should do what it can to > prevent the programmer from *inadvertently* shooting himself in the > foot, while allowing him to *deliberately* shoot himself in the foot. >
No, a good systems language should do exactly what it's told. Supporting tools should tell the programmer if he's risking shooting himself in the foot.
Show 6 quoted lines
> >> You can tell C compilers to >> check all array accesses, but that is a performance issue. > > Runtime checking of arrays in D is a performance issue too, so it is > selectable via a command line switch.
Same as in C then.
Show 7 quoted lines
> But more importantly, > > 2) For dynamically sized arrays, the dimension of the array is carried > with the array, so loops automatically loop the correct number of times. > No runtime check is necessary, and it's easier for the code reviewer to > visually check the code for correctness. >
But this introduces handy but, strictly speaking, unnecessary overhead as well, meaning, in short; 'D is slower than C, but easier to write code in'.
So in essence, it's a bit like Python, but a teensy bit faster and a lot easier to shoot yourself in the foot with.
What was the niche you were going for when you thought up D? It can't have been systems programming, because *any* extra baggage is baggage one would like to get rid of. If it was application programming I fail to see how one more language would help, as there will be portability problems galore and it's still considerably slower to develop in than fe Python, while at the same time being considerably easier to mess up in.
-- Andreas Ericsson andreas.ericsson@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231