Skip to content

Array revamp v2 - #169

Draft
mikaib wants to merge 35 commits into
mainfrom
array-revamp-v2
Draft

Array revamp v2#169
mikaib wants to merge 35 commits into
mainfrom
array-revamp-v2

Conversation

@mikaib

@mikaib mikaib commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

second iteration of #164

@elliott5

Copy link
Copy Markdown
Contributor

Array Set() and Get() code contains the test:

	if idx < 0 {
		panic("Array index out of bounds")
	}

Which tells the user that a (Haxe) Array has gone out of bounds.

It would be more efficient to rely on Go's own built-in bounds tests which would produce a panic of the form:

panic: runtime error: index out of range [-1]

For an example see https://go.dev/play/p/f8JZXr4bp7o

@mikaib

mikaib commented Aug 30, 2026

Copy link
Copy Markdown
Contributor Author

thank you for the merge <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

3 participants