Question about arraylist #115
Labels
No labels
bug
discussion
documentation
duplicate
ignore
new feature
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
golibs/gms-gods#115
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi.
I have a question about arraylist. Here.
In go, the slice is already a dynamic array. Is it more appropriate to change it to an array?
@fakecowboy I think you might have a point. I can't remember my reasoning why I used a slice when I intended to use an array.
@fakecowboy took some time to get back to this question, but the reasoning is that the size of an array in golang is fixed at compiler runtime and can not be dynamically extended. Essentially then ArrayList indeed works in similar fashion to how the native slices work, however the added functionality of ArrayList could be a reason for using GoDS ArrayList rather than slice, e.g. iterators, enumerables, and other list functions.