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

Introduce redef keyword #8268

Closed
8 tasks done
magnus-madsen opened this issue Aug 8, 2024 · 11 comments
Closed
8 tasks done

Introduce redef keyword #8268

magnus-madsen opened this issue Aug 8, 2024 · 11 comments
Assignees
Labels
student programmer Relevant for student programmers

Comments

@magnus-madsen
Copy link
Member

magnus-madsen commented Aug 8, 2024

  • Introduce redef keyword as a short hand for override def.
  • Refactor the standard library and tests to use redef.
  • Remove support for override. (Or better put it behind --Xdeprecated flag)
  • Update the KeywordOtherCompleter (new in, old out)
  • Update VSCode keywords (new in, old out)
  • Update Highlight.js keywords (new in, old out)
  • Update doc.flix.dev
  • Update flix.dev

Note: This should not concern visibility, so this changes nothing w.r.t. pub.

@magnus-madsen magnus-madsen added the student programmer Relevant for student programmers label Aug 8, 2024
@magnus-madsen
Copy link
Member Author

magnus-madsen commented Aug 19, 2024

@jaschdoc Next I would drop the requirement that declarations in instances must be public.

Then you can refactor instances to use redef (and not be public).

@jaschdoc
Copy link
Member

Okay but this goes against what you wrote above. New design? :)

@magnus-madsen
Copy link
Member Author

What do you mean? I suppose what I was trying to communicate is that first changing everything to use redef, and then changing everything to drop pub seems like double work. Might as well do it in one pass.

@jaschdoc
Copy link
Member

Should I also remove the pub constraint in the trait declaration?

@magnus-madsen
Copy link
Member Author

What do you mean? I am only asking for changes to instances at this time.

@jaschdoc
Copy link
Member

Alright. In Rust the pub keyword is unused on trait declarations because it defines an interface where all members are public. I though that it would be relevant to this. I will, however, only rework the instances for now.

@jaschdoc
Copy link
Member

But do we allow private functions on a trait declaration?

@magnus-madsen
Copy link
Member Author

But do we allow private functions on a trait declaration?

We have not decided. But it could make sense.

@jaschdoc
Copy link
Member

jaschdoc commented Aug 25, 2024

  • Introduce redef keyword as a short hand for override def.
  • Refactor the standard library and tests to use redef.
  • Remove support for override. (Or better put it behind --Xdeprecated flag)
  • Deprecate pub keyword for instances
  • Update the KeywordOtherCompleter (new in, old out)
  • Update VSCode keywords (new in, old out)
  • Update Highlight.js keywords (new in, old out)
  • Update doc.flix.dev
  • Update flix.dev

@magnus-madsen
Copy link
Member Author

I think we just need to get rid of the pub in pub redef for instances.

@jaschdoc
Copy link
Member

I think we can close this now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
student programmer Relevant for student programmers
Projects
None yet
Development

No branches or pull requests

2 participants