|Topic was automatically imported from the old Question2Answer platform.
I have often got stuck assuming that Array.remove() will return the item being removed. Seems to be 99% that I call remove I am planning on using the item that I am removing. If remove() returned the item rather that void it would be convenient and save a line of code. Is there a reason why this isn’t the way remove works? If it would be too inefficient then prehaps we could add a method call liked “popFrom(int position)” that would add that line of code. I know I can just write a helper function and include it in my autoLoad. I guess I’m more so curious why remove does not return the item in the first place.
Thank you, and happy godoting.