Replies: 3 comments 1 reply
-
Yikes. Don't we have higher priorities? |
Beta Was this translation helpful? Give feedback.
-
Sidenote: |
Beta Was this translation helpful? Give feedback.
-
I see your point, but I have to admit that the syntax for creating instances hasn't bothered me personally. That being said, a more consistent syntax does appeal to me. It would be nice to get input from more people on this... Let's discuss it during our weekly meeting? |
Beta Was this translation helpful? Give feedback.
-
I think that there is a severe inconsistency in our syntax. Most of the elements in a reactor look like this:
This could be summarized using the following rule:
However, the syntax for reactor instances uses a completely different scheme:
Besides the inconsistency, there is another problem with using the
new
keyword.new
has a very specific meaning in various programming languages (dynamic memory allocation). However, that is not what is happening in several of our implementations. I think that usingnew
in LF is very misleading, since LF does not do any memory management.Instead, we could use this syntax:
We could also allow an optional type annotation, in which case all the following would be valid (this is inspired by Kotlin):
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions