Notes IV

bearophile bearophileHUGS at lycos.com
Tue Jan 22 16:33:14 PST 2008


downs:

>Programmers will create miniature languages anyway.<

But doing it with Java allows you to keep the code itself more readable and simpler for less skilled programmers, and that's essential for a large wide spreading of a language.


>This is already done in some places (array bounds checking).<

I was mostly talking about pointers (and other things).


>I think what you want goes more in the direction of a Wishlist with vote features.<

No, I am talking about a list of the most common mistakes people do writing their programs, so D syntax can be modified to avoid some of them.


>Disagreed. Code space isn't limited; I see no reason to leave out functions that might be useful.<

Brain space is limited; from experience I have seen that a language that "fits the brain" allows you to code much faster.


>Example using scrapple.tools:<

I'll take a look, thank you.


>Vote [+] for Mersenne Twister in the standard library.<

No need to vote, it's already there in DMD 2.x. But I think that's the only generator present (beside the crappy C one), and I have explained why I think that's not enough.


>I'm not sure whether such things should be in the standard library. Very tentatively in favor.<

Because otherwise you need to write them yourself in your personal lib :-)


>>14) Reals [...] I don't like the compiler to fake them silently for me).<<
>I do. :)<

Maybe you can explain me why.


>This is not a bug;<

It's a bug (of mine). In that section I am not talking about DMD bugs, but about bugs written by programmers, and how they can be avoided/reduced...


>Also, the existing usage of the comma expression makes it harder to implement more powerful native tuples.<

( and ) are used for other purposes, if you use them for tuples you may end with the ugly syntax python uses for singleton tuples:
x,
that you can write as this because it's the comma that defines the tuple:
(x,)
I think the Fortress language uses better sequence literals.

Bye,
bearophile



More information about the Digitalmars-d mailing list