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

Add @gapproperty #974

Closed
wants to merge 2 commits into from
Closed

Conversation

lgoettgens
Copy link
Member

Resolves #680.

Copy link

codecov bot commented Mar 13, 2024

Codecov Report

Merging #974 (3442eef) into master (e5258e5) will increase coverage by 0.05%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #974      +/-   ##
==========================================
+ Coverage   75.80%   75.85%   +0.05%     
==========================================
  Files          51       51              
  Lines        4187     4196       +9     
==========================================
+ Hits         3174     3183       +9     
  Misses       1013     1013              
Files Coverage Δ
src/macros.jl 98.64% <100.00%> (+0.18%) ⬆️

Copy link
Member

@fingolfin fingolfin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First off, thank you for your contribution!

However, I recommend that next time we have a quick chat before you tackle one of these -- because in this case, re-reading issue #680, today my thoughts about it are "let's just close it, adding ::Bool is easy, and the only problem with it is that one can forget to do it; but one can also forget to use @gapproperty instead of @gapattribute, so we really gain nothing but have to invest a lot of work."

But since you already invested the work now, I am reluctant to let it go to waste... OTOH if we add it, we need to maintain it, and it ever so slightly increases complexity...

Perhaps @ThomasBreuer has a thought on this as well?


Return `true` if the input integer is odd.
"""
@gapproperty isoddint_GAP(x::Int) = GAP.Globals.IsOddInt(x)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps there could be a test using @inferred to verify it really is type stable and returning a Bool?

@lgoettgens
Copy link
Member Author

lgoettgens commented Mar 19, 2024

First off, thank you for your contribution!

However, I recommend that next time we have a quick chat before you tackle one of these -- because in this case, re-reading issue #680, today my thoughts about it are "let's just close it, adding ::Bool is easy, and the only problem with it is that one can forget to do it; but one can also forget to use @gapproperty instead of @gapattribute, so we really gain nothing but have to invest a lot of work."

But since you already invested the work now, I am reluctant to let it go to waste... OTOH if we add it, we need to maintain it, and it ever so slightly increases complexity...

Yeah, I totally understand and am for than fine with just closing this PR. If I remember correctly, I was a bit frustrated from some other task and just wanted something "easy to tackle" and thus just took something from the issue tracker to do. Next time, I'll talk to you beforehand :)

@fingolfin
Copy link
Member

Just to avoid misunderstanding: of course it is fine for you to work on something w/o consulting with me first, I just want to avoid causing frustration on your part when I then later come and say "oh no we don't want that" and discard your hard work -- I hate doing that :-/. Hence my request (I think you already got that, but internet communication is difficult).

And I totally get the bit about working on something "attainable" when frustrated on something else, I also do that ;-)

@fingolfin
Copy link
Member

We talked about it, and decided to not move forward. Thank again Lars for your efforts, and sorry!

@fingolfin fingolfin closed this Apr 5, 2024
@lgoettgens lgoettgens deleted the lg/gapproperty branch April 26, 2024 09:53
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.

Add @gapproperty
2 participants