-
Notifications
You must be signed in to change notification settings - Fork 12
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
Built-in operators and their precedence #271
Comments
A table of operators is a bit more interesting in Lean, because the syntax is extensible. The set of available operators can depend on which libraries have been imported and which namespaces are opened. That said, a table of all the operators that ship with Lean sounds useful. In what concrete way would this help you get your work done? |
It doesn't necessarily have to be a table, just a single place where all the built-in operators are listed. This would help me as follows: When reading code, I might come across an expression such as While writing code or learning the language, I want to know which operators are available at my disposal so that I can write my code in an optimal way. Having all the built-in operators listed in a single place would help me learn the language, especially since Lean is a functional language that comes with a few operators ( The reference manual might not be the right place for such a list but having such a list somewhere would definitely be very helpful to me.
It might be worth taking a look at the documentation for Swift, since it also allows you to define custom operators. Their documentation is split into two pages:
|
It's possible that I somehow missed it but I couldn't find a list of all the built-in operators (like
+
,-
,%
,<
, etc.) with their relative precedence and associativity.Here are some examples from other languages to get a better idea of what I'm looking for:
I believe the list of operators for Lean can be found here.
The text was updated successfully, but these errors were encountered: