-
Notifications
You must be signed in to change notification settings - Fork 238
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
Prototypal #21
Comments
When dealing with streams OOP obscures reasoning ( what type is this? does it have this function? does it have this property? Etc) , structs or dictionaries are better suited to improve code reuse, since you can simply check for fields and the values are either other structs or a built in variable type. Although dictionary/struct literals are ok for me, just no functions embedded inside data. |
Exactly. Prototypal objects are dictionaries/hashes that can optionally get properties from another object on it's prototype. |
👍 I agree, I like how lightweight prototypical inheritance is. However, I'm not sure how this would work if Streem were to use static typing or some other sort of type checking. I guess something like Go's type checking could be used, where objects can be duck typed, but the types are still checked for the appropriate methods and fields at compile time. |
Yup. See #12, where I suggested soft-typing very similar to yours. |
I think it would be nice if Streem used prototypal inheritance and object literals, (as in JavaScript). This makes for a very light-weight, expressive, powerful, and most of all, quick OOP-type programming experience.
The text was updated successfully, but these errors were encountered: