5 Aug
2020
5 Aug
'20
6:15 p.m.
On Wed, Aug 05, 2020 at 02:42:34PM -0400, David Mertz wrote:
Here's something I think could be more useful (again, I'm +0 at best myself).
@unit("meter") a = 3 # a = unit("meter")("a", 3)
Why does the measurement "3 metres" need to know that it is bound to the target name "a"? If you then did: x = a y = a + unit('metre')('b', 0) what would x.name and y.name be? And when would you need to know that? If we're talking about associating units to measurements, surely we don't need anything more than function call syntax or operators: # Something like one or more of these a = unit('metre', 3) b = metres(3) g = 9.8 * metres / seconds**2 for declaring units. -- Steven