Of course, after the compilation it's still all just ints. My idea is just about turning the abstract API that arrays expose into something that pushes people towards a particular usage
Of course, after the compilation it's still all just ints. My idea is just about turning the abstract API that arrays expose into something that pushes people towards a particular usage
for i in range(len(my_list)):
func(my_list[SomeAnnoyingIntWrapper.LongConstructorName(I)])
for i in range(len(my_list)):
func(my_list[SomeAnnoyingIntWrapper.LongConstructorName(I)])
for i in range(len(my_list)):
func(my_list[i])
but that code is more or less just as tempting to write compared to the better
for element in my_list:
func(element)
for i in range(len(my_list)):
func(my_list[i])
but that code is more or less just as tempting to write compared to the better
for element in my_list:
func(element)
(they should be some Index "struct" that the compiler inlines, purely to make good array access like first/last and iterators much easier than unsafe indexing)
(they should be some Index "struct" that the compiler inlines, purely to make good array access like first/last and iterators much easier than unsafe indexing)
I only figured it out once I asked other people...
I only figured it out once I asked other people...