-
Notifications
You must be signed in to change notification settings - Fork 52
add primitive refs package #307
New issue
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
Conversation
Hey, was just looking through PRs and noticed this one. This will be really useful, but you can do it much simpler and more universally, like this:
With the "new generics" ( |
With new generics this shouldn't be needed most of the time - maybe add description and use case. Doesn't rly seem like stdlib material. |
@Frotty can you clarify this a little more? Are "new generics" already a thing? In used in the stdlib? documented in the manual? "Will be", "shouldn't", "needed", "most of the time" - so, is it useful or not? |
What is "new generics"? Where can I learn it?
Doesn't it solve the |
Perhaps in the ticket with the same name wurstscript/WurstScript#679
How about you tell me - with a description?
There is no problem, so I'm not sure what you are referring to. Primitives are call by value and objects call by reference, just like primitives and handles in Jass. With this PR you could use a |
Hey @Frotty
From looking at this ticket it's not quite clear what already works/doesn't work, or what is stable/unstable. Is the
It is specifically for use where allocation is needed for primitives. In Bastards and Conquerors, for example, I use it for both
I agree that it's not a "problem" as such, but that is at least one of the use cases I had intended - example. |
Only 1. - that is the point. The colon syntax already works, it is already used in the stdlib, I didn't make any mention about stability. Not sure what EBR has to do with this, it doesn't even use any generics outside of stdlib.
Your examples aren't nested, a simple global would suffice. If it were nested, a stack like it is done in the stdlib seems fine in library use.
So will you update the PR ? |
31821ab
to
e704f04
Compare
No description provided.