Phobos examples and auto

Marco Leise Marco.Leise at gmx.de
Tue Nov 8 09:03:43 PST 2011


Am 07.11.2011, 14:09 Uhr, schrieb Kagamin <spam at here.lot>:

> All you need to know is that it's a time, and you don't need to know  
> anything else. The design makes sure the type supports idiomatic  
> operations, and the type system makes sure the operations are ok. The  
> docs also demonstrate how easy it is to write D: you don't need to know  
> the type name and everything still works.

It takes a while for a person to build up so much faith into the library.  
And after all there are different 'times' in the wild, like file times,  
local/UTC time, dates without times, times without dates, hardware tick  
counts. I'm not sure I can use the current system time and subtract a  
TickDuration from it. Does this work, or only as long as you don't cross  
module boundaries? It may be a minor issue or personal taste, but I also  
like to be able to jump to the declaration of a type by ctrl-clicking on  
its name or get auto-completion that - despite its name - works only with  
variables not declared as auto for now in the most sophisticated D2 IDE on  
Linux. And since often you only have to type two or three letters of a  
type name for it to be auto-completed, it isn't even often a time saver to  
write auto. I accept the "easier to refactor the used type" argument  
though :)


More information about the Digitalmars-d mailing list