Phobos examples and auto
Simen Kjærås
simen.kjaras at gmail.com
Wed Nov 9 05:45:09 PST 2011
On Tue, 08 Nov 2011 17:53:06 +0100, Jonathan M Davis <jmdavisProg at gmx.com>
wrote:
> On Tuesday, November 08, 2011 17:25:57 Marco Leise wrote:
>> After some hacking into the keyboard layout file, I now use the alias ℕ
>> (the mathematical symbol for the non-negative integral number)
>> everywhere
>> instead of the ugly size_t. It is even shorter than 'auto'.
>>
>> ℕ i = 5;
>> ℕ j = i;
>> ℕ k = j;
>> ℕ l = k;
>>
>> ;)
>
> LOL. And no one but you will have any idea what your code is doing. It
> _is_
> kind of cool to see unicode like that in D, but that's _really_ bad
> practice
> if you intend anyone else to ever read your code. If it's just for you,
> then
> you obviously can do whatever you want, but size_t is the correct name
> and
> what others are going to expect if they ever read your code.
Also, ℕ would more correctly be a BigUInt, as it has no upper bound.
More information about the Digitalmars-d
mailing list