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

Revise Principles #19

Open
3 of 6 tasks
magnus-madsen opened this issue Dec 12, 2020 · 1 comment
Open
3 of 6 tasks

Revise Principles #19

magnus-madsen opened this issue Dec 12, 2020 · 1 comment

Comments

@magnus-madsen
Copy link
Member

magnus-madsen commented Dec 12, 2020

  • Rename fashion-driven to "Timeless"
  • Move up "no blessed library".
  • Rename "No dead or unreachable code" to "No unused declarations"
  • Monotonic declarations.
  • Layered programming language (functions, parametric polymorphism, type classes)
  • Type class principles.
@mlutze
Copy link
Member

mlutze commented May 30, 2021

I have a few nitpicks regarding the type class principles.

For the Explicit Override principle:

This ensures that there are no dangling overrides, i.e. functions definitions that do not match any signature of the type class.

This check happens, but it's not directly related to the override modifier.

Instead, the override modifier ensures:

  • the user does not unknowingly re-implement something that already has a default implementation (required explicit override)
  • the user does not just put override modifiers everywhere, making them meaningless (no overriding when there's no default)

Regarding the Default Implementations principle:

... can always be overridden ... For example, to provide a more efficient version.

Do we want to strengthen this or the override principle to say that an override must be observationally equivalent to the default implementation?

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

No branches or pull requests

2 participants