Replies: 1 comment
-
I think you are right that it is nice for new people. I also think nullary functions have upsides. Nullary functions allow you to decide later that it must now be an actual computation, or it is recursive, or whatever it is. Nullary functions keep the implementation a little more flexible. I don't think there is a parser confusion since modules are upper case and record operations work on lowercase things. For the upsides, the compiletime computation could also be done for nullary functions right? see if its "simple enough" to be safe to evaluate or perhaps annote it with |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Idea
What do you think of adding support for constants at the top of a namespace as syntactic sugar for a constant function?
desugars to
Discussion
Additionally, if a constant must be pure (and cannot be recursive) then we could evaluate a constant at compile-time and inline the value (but then we should probably not desugar to a function).
Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions