On Tue, Mar 6, 2012 at 4:53 PM, H. S. Teoh <span dir="ltr"><<a href="mailto:hsteoh@quickfur.ath.cx">hsteoh@quickfur.ath.cx</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Tue, Mar 06, 2012 at 06:43:39PM -0500, Jonathan M Davis wrote:<br>
> On Tuesday, March 06, 2012 17:38:09 Adam D. Ruppe wrote:<br>
> > writeln(time.toISOExtendedString()); // bzzt, wrong, but this<br>
> > used to work!<br>
><br>
> Yes, and it was quickly changed to toISOExtString, because<br>
> toISOExtendedString is painfully long. toISOExtString is bad enough,<br>
> but you can't really make it any shorter without making the name<br>
> uninformative.<br>
<br>
</div>You *could* shorten String to Str, but that would be inconsistent with<br>
everything else (e.g. toString), so that's a no-go.<br>
<div class="im"><br>
<br>
> > Nope, apparently, I meant "dur". Ridiculous.<br>
><br>
> A Duration needs to be constructed with a template, and<br>
> duration!"hours"(13), duration!"seconds"(44), etc. is painfully long<br>
> when used in expressions. So, it was shortened to dur. I don't know of<br>
> any other abbreviation which would make sense.<br>
</div>[...]<br>
<br>
I'm on the fence about this one. It's true that duration!"seconds"(44)<br>
is uncomfortably long, but 'dur' also tends towards the side of<br>
meaningless, esp. if it occurs only once or twice in otherwise-unrelated<br>
code. I'm inclined to leave it as 'duration' since I can't think of any<br>
good abbreviations for it either.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
T<br>
<br>
--<br>
A bend in the road is not the end of the road unless you fail to make<br>
the turn. -- Brian White<br>
</font></span></blockquote></div><br><div>I wasn't around for the creation of datetime but I'm curious why a boost datetime-like duration construction shortcut approach to durations wasn't used.  That is, you can write weeks(1), months(6), years(10), hours(17), minutes(12), etc. (although there is now days(int) for some reason).</div>