-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Member/instance function implementation #14
Comments
The use of I guess it could be used for both since The use of Are there are plans for a |
What about using
Thinking about it in terms of defining its characteristics. About the |
Why decouple the prototype and implementation?
👍 for the dot syntax. |
Borrowing the idea from Rust, you can have multiple implementations for the same prototype split across multiple files. Alongside that, I have an idea in mind for traits/contracts implementation when time comes for it, and it will go hand in hand with decoupling. |
As a side note, Scala's object-class difference is interesting.
Syntax idea came from this. Point-free syntax, where the instance function and the object place are reversed. Given the previous record implementation, another object example could be, for a factory pattern, after we have currying.
|
So why would you wanna go with
Also, couldn't I can't say much to the object classes. I don't see how they would be useful, at first glance they just seem to complicate things without providing a real benefit. But to be fair, I'm probably suffering from the Blub paradox here since I have never used a language that has them and can't really imagine a use case in which I would use them over another concept I already know, so for the time being I'd rather not push this particular feature into any specific direction myself. |
About using |
On a related note,
Those would be some examples. I think it better describes the modern iterator-like usage of |
Delaying this to Alpha v0.2 |
I have a couple ideas, but other are welcome:
Given
We have:
Analogous for other structures like types and structs.
The text was updated successfully, but these errors were encountered: