Number module

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Number module

fschmidt
Administrator
I think I want to add a Number module with these methods:

Number.double replacing Luan.assert_double
Number.long replacing Luan.assert_long
Number.integer replacing Luan.assert_integer
Number.float
Number.short
Number.byte
Number.type replacing Luan.number_type

Like with String, I would let these methods be used in an object-oriented way like:
a = (10).long()
b = 3
c = b.double()
c.type() == "double" or error "not double"
What do you think?
Woe to those who call bad good and good bad -- Isaiah 5:20
Following the Old Testament, not evil modern culture
Reply | Threaded
Open this post in threaded view
|

Re: Number module

Hugo <Nabble>
I think this is more intuitive than the assert_ methods. You can go ahead.
Reply | Threaded
Open this post in threaded view
|

Re: Number module

fschmidt
Administrator
done, closing
Woe to those who call bad good and good bad -- Isaiah 5:20
Following the Old Testament, not evil modern culture