We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The current API is too easy to misuse:
generic [T: Type] function allocate(count: Index): Address[T];
To allocate a single object, the client should pass 1, but they might easily pass sizeof(T) instead, which allocates more memory.
1
sizeof(T)
We should break this up into:
generic [T: Type] function allocate(): Address[T]; generic [T: Type] function allocateBuffer(count: Index): Address[T];
This issue was pointed out in: #310
The text was updated successfully, but these errors were encountered:
eudoxia0
Successfully merging a pull request may close this issue.
The current API is too easy to misuse:
To allocate a single object, the client should pass
1
, but they might easily passsizeof(T)
instead, which allocates more memory.We should break this up into:
This issue was pointed out in: #310
The text was updated successfully, but these errors were encountered: