3 ms·
Sure, the terseness is nice, and it is possible to learn this interface and make sense of it, but to me it still seems like abusing OOP paradigm in a way that c
by montroser 5y ago
Sure, the terseness is nice, and it is possible to learn this interface and make sense of it, but to me it still seems like abusing OOP paradigm in a way that conflicts with reality.
Abstract of any programming language, the concept of "2" has the properties that it is an integer, that it is a natural number, that it follows "1", that it is prime, etc. But it doesn't have a property "years".
From another perspective, back to programming, if "years" and "step" make sense as properties of "2" then does _any noun_ make sense? Is it cool for every library to monkey patch its own domain's worth of nouns to be properties of every number? 2.centimeters, 2.users, 2.widgets?
I can get with natural expressions for date math, but how about something more like
Time("2 years from now")
Then I can read that to mean we are constructing a time, described by the parameter.