4 ms·
I'm sad that i don't see any references to first class functions and closures. But that may be because they're not implemented yet. Also, any thoughts about al
by Raphael_Amiard 17y ago
I'm sad that i don't see any references to first class functions and closures. But that may be because they're not implemented yet.
Also, any thoughts about all that "immutability by default" rumble ? Is ooc too close to c to give that a thought ? Simplify the use of immutable data structures would be very cool, and very possible since ooc has a gc.
Actually, i was thinking about a "competitor" for this nice language, and the closest thing to it that i found was BOO : http://boo.codehaus.org/ http://boo.codehaus.org/. Boo has a syntax that is just as nice, comparable set of features + closures, very nice type inference, and very good interaction with native code. It runs on .Net, but i think the interop with c is really very flawless for once. You can even manipulate pointer data. And it has the nicest macros i've seen yet in a non lisp language (i've not seen a lot except lisps tho).
- nddrylliog 17y agoClosures are planned, indeed. About immutability, it's really a hard call for me to do here. C is very much about in-place data modification (as far as I know). Working with immutable objects seems to be a very different approach. What do you mean with "simplify the use of immutable data structures" ? Like a good support for const? Thanks for the feedback, I'll definitely look deeper into Boo to steal.. huh get inspiration from it ;)
- Raphael_Amiard 17y ago> About immutability, it's really a hard call for me to do here. C is very much about in-place data modification (as far as I know). Working with immutable objects seems to be a very different approach. Yeah i know what you mean. But anyway this is a whole other topic, and it could be programmed by third parties. The important part would be more about enforcing a transitive const keyword, and some other nice things like that.I think what the d people are doing at the moment is very interesting : http://www.digitalmars.com/d/2.0/accu-functional.pdf http://www.digitalmars.com/d/2.0/accu-functional.pdf Another question i had is, do you plan to provide any meta-programming facilities (macros) ? Boo is very interresting in this regard, i can only recommend you look into it. Oh and one last thing, how does ooc fare performance wise compared to plain c at the moment ? Also i've been toying a bit with ooc and it's very nice to code in. I will probably follow its evolution with a great lot of interrest. Thanks for your work and dedication !
- jongraehl 17y agoLook at http://www.digitalmars.com/d/2.0/const3.html http://www.digitalmars.com/d/2.0/const3.html also. C++0x and D both seem to allow compile time evaluation of expressions or even full functions that depend only on constants. I agree that mutable state is valuable and its use should be easy (boo Haskell). (note: the example the D article gives of C "int const p" should be "int const p")