On 09/04/2012 05:55 PM, Nicholas Londey wrote: > I could easily implement my own as I have done in C++ in the > past but assume there is a standard implementation which I would prefer. > Any help or links to examples much appreciated.
UFCS enables some interesting syntax: struct Grams { size_t amount; } @property Grams grams(size_t amount) { return Grams(amount); } void main() { auto weight = 5.grams; } C++11 brings similar conveniences as well. Ali