Hey there.
One thing I’m curious on is variable unpacking, ie in python one could:
a_list = [1,2,3,4,5]
a,b,c = a_list[:3]
is there a reason that we wouldn’t want to do this in odin? the workaround is:
t := a_list[:3]
a, b, c := t[0], t[1], t[2]
additionally, python has a “rest” syntax, so you can get the head or tail from lists as such:
a, *b, c, d = [1,2,3,4,5]
# a = 1, b = [2,3], c = 4, d = 5
has there been any thought on this? perhaps not to everybody’s taste…
Yes. Check out this post to understand why: