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

Change polymorphic type enclosures from parentheses to square brackets #483

Open
mtshiba opened this issue Feb 1, 2024 · 0 comments
Open
Labels

Comments

@mtshiba
Copy link
Member

mtshiba commented Feb 1, 2024

The current Erg polymorphic type is denoted as K(T), but K[T] is more reasonable.
First, polymorphic types are not functions; Class is a true type-level function that takes a type and returns a class, while Array, for example, is not.
Second, it is incompatible with Python's syntax: Python's syntax for polymorphic types is K[T], and K(T) covers the syntax for creating an instance of class K.

@mtshiba mtshiba added the syntax label Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant