Arbitrary abbreviations in phobos considered ridiculous
Stewart Gordon
smjg_1998 at yahoo.com
Wed Mar 7 14:55:51 PST 2012
On 06/03/2012 16:38, Adam D. Ruppe wrote:
> One of the stumbling blocks on using std.datetime is how
> many bizarre abbreviations it has.
>
> auto time = Clock.currentTime(); // bzzt, wrong
>
> if(time - something > duration!"hours"(4)) // bzzt, wrong
>
> writeln(time.toISOExtendedString()); // bzzt, wrong, but this used to work!
<snip>
The mention of this one reminds me of another issue: capitalisation consistency. It would
be nice to standardise whether acronyms/initialisms occurring within names have just the
first letter or all letters capitalised. I'm thinking best is to treat them as words and
therefore capitalise just the first letter. Though I've been known to do otherwise in the
past.
But it's confusing enough that there are still many functions in Phobos whose names are
all lowercase when they should be camelCase.
The Java API is in a mess in this respect:
http://www.mindprod.com/jgloss/inconsistencies.html
We'd have no trouble avoiding this if only Phobos was designed to be free of such
inconsistencies from its beginning.
Stewart.
More information about the Digitalmars-d
mailing list