Skip to content
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

gc:orc defines gcArc #17346

Closed
wants to merge 3 commits into from
Closed

gc:orc defines gcArc #17346

wants to merge 3 commits into from

Conversation

Clyybber
Copy link
Contributor

@Clyybber Clyybber commented Mar 11, 2021

@Clyybber Clyybber mentioned this pull request Mar 11, 2021
@timotheecour
Copy link
Member

timotheecour commented Mar 11, 2021

  • while you're at it, we should add a defined gcRefc for gc:refc
  • this is a breaking change [1]; instead we should introduce gcArcLike instead, which wouldn't be a breaking change and is probably a bit easier to use (avoids things like when defined(gcArc) and not defined(gcOrc), which also isn't future prof in case another arc variant is later introduced)
when defined(gcArc): echo 1
elif defined(gcOrc): echo 2
else: echo 3

before PR:
nim r --gc:orc main # 2
after PR:
nim r --gc:orc main # 1

(gcArcLike is better than gcArcOrc in case we later add another variant than orc based on arc, but we can bikeshed the name, eg gcSomeArc etc)

gcArcLike abides by the rule that each gc shall have its corresponding exclusive defined symbol

@Araq
Copy link
Member

Araq commented Mar 12, 2021

We have gcDestructors for ARC-like GCs already. :-)

@Araq Araq closed this Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants