3 ms·
You wouldn't write new TimeSpan(2,0,0,0), you'd write TimeSpan.FromDays(2). There's nothing stopping you from binding a function "days" to wrap TimeSpan.FromDa
by MichaelGG 13y ago
You wouldn't write new TimeSpan(2,0,0,0), you'd write TimeSpan.FromDays(2).
There's nothing stopping you from binding a function "days" to wrap TimeSpan.FromDays.
If this is what people consider to be some pinnacle or notable point in expressiveness, yikes.
- bad_user 13y agoOh, but we can expand on that ... scala> 2.days + 10.minutes res: FiniteDuration = 2890 minutes I just don't get it. So a literal like "0.2f" to denote a Float (and not a Long) is acceptable. A literal like "300.5m" to denote a decimal and not a floating-point is acceptable. But somehow other kinds of literals for other units of measurement are not, because Dear God, magic, magic!!!