daokoder / dao-modules

Dao Standard Modules
http://daovm.net
12 stars 5 forks source link

Minor: constructor of IPv4Addr has no overload for IPv4Addr.octets #44

Closed dumblob closed 9 years ago

dumblob commented 9 years ago

".octets(self: IPv4Addr) => tuple<int,int,int,int>" should be somehow compatible with the constructor for IPv4Addr as serializing IP to string and then back parsing to an IP address doesn't make much sense to me.

Unfortunately, in Dao we can't simply unfold the tuple into 4 routine arguments, so we'll probably need to add another constructor overload.

Night-walker commented 9 years ago

Unfortunately, in Dao we can't simply unfold the tuple into 4 routine arguments

We can :)

load net

ip1 = net::IPv4Addr(127,0,0,1)
ip2 = net::IPv4Addr(ip1.octets, ...)
dumblob commented 9 years ago

Hm, didn't try it with tuples, only lists. Only good news today :)