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

Operators should be defined as modules #58

Open
VonTum opened this issue Jan 30, 2025 · 0 comments
Open

Operators should be defined as modules #58

VonTum opened this issue Jan 30, 2025 · 0 comments
Labels
enhancement New feature or request Request Input These are issues about the design of the language, and thus should be discussed

Comments

@VonTum
Copy link
Collaborator

VonTum commented Jan 30, 2025

Instead of being a compiler builtin, our operators should be defined in a standard library .sus file

The naming scheme is still up in the air, but as an example:

module __add__ #(int MAX_A, int MAX_B) {
  interface __add__ : int #(MAX: MAX_A) a, int #(MAX: MAX_B) b -> int #(MAX: MAX_A+MAX_B)
  /* Implementation is a compiler built-in */
}

That way we also don't need to define the way these bounds evolve in the compiler itself, and thus the user can more easily see what's under the hood.

This was referenced Jan 30, 2025
@VonTum VonTum added enhancement New feature or request Request Input These are issues about the design of the language, and thus should be discussed labels Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Request Input These are issues about the design of the language, and thus should be discussed
Projects
None yet
Development

No branches or pull requests

1 participant