-
Notifications
You must be signed in to change notification settings - Fork 236
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
Will any OOP grammar be supported? #42
Comments
No. I do not think that OOP is conducive to stream oriented programming. I'm not agains OOP in principle, in fact, I like Ruby, but in this context, OOP would feel slightly tacked-on and unwieldy. Objects, Methods, and Properties aren't suited to helping you think in a way that is based on filtering, mapping, transforming, and other stream oriented operations. That is why a more prototypal&functional approach might be better in this case. Prototypal is sort of a light wait version of OOP, so you could still program streem that way, and functional is inherently suited to list/stream based programs. (Just look at Lisp and Haskell). |
ok, you mean that streem also is an object-based language(of course, Flow-based), it may use a light object model such as prototype , but not use the class-base model like in Java. |
Maybe. But I think maybe that even Ruby's notion of classes might be a little unwieldy in this case. I was suggesting prototypal because I feel that it has all the advantages of classical, but with a little more of a lightweight, flexible feel to it. Also, classical OOP doesn't quite match up with the idea of a streem oriented language. Functional programming seems best, actually. But then again, OOP might be really cool in this case, with a few tweaks and new features! :D |
Functional programming and OOP can play together nicely, you just have to be careful about state. From my experience with JavaScript, I feel like there's not much that you can do with classes that you can't do with prototypes. Also, when dealing with items in streams, the prototyping could come in handy. |
Yeah... But maybe less weird/buggy syntax than js's for prototypes would do streem good. |
Agreed. While I actually like how JavaScript does OOP with prototypes, the whole |
I like the Swift syntax for inheritance: |
F# does OOP quite well for a functional language. |
I like Haskell and OCaml's take on OOP. It's not quite OOP, but close enough to make OOP acolytes happy. |
@dajoh Out of curiosity, do you have any examples you'd like to highlight? I haven't used F#. |
Coffeescript replace the prototype with the “class” syntax. |
I really don't think this should be closed. We haven't solved anything yet. |
I like @mySingleLive's idea to follow in CoffeeScript's footsteps. |
👍 |
There are already some functional syntax in the design of streem.
Will the "class", "method", "inheritance" or any other OOP elements be in this language?
I think "everything is an object" is good in ruby. Can I use the "Stream", "Pipleline" as an object in runtime?
The text was updated successfully, but these errors were encountered: