4 ms·
EC: An Expressive and Intuitive, C Style Object-Oriented Programming Language
- pcwalton 9y ago> eC already takes care of many aspects of memory management through reference counting. However, it does not automatically manage memroy [sic] allocated with the new operator, which must be manually freed with the delete operator. Furthermore, to avoid the overhead and recognizing the limits of reference counting, reference count increments and decrements is left to the user, except for the initial construction (at instantiation) and destruction of the object (when it goes out of scope). At the moment this automatic behavior is also limited to global and member instances, other instances currently start with a 0 reference count and must be manually destroyed with delete. This is a recipe for use-after-free vulnerabilities.
- i336_ 9y agoSome licensing and status tidbits: - http://ec-lang.org/ http://ec-lang.org/ and http://ecere.org/ http://ecere.org/ point to each other - ec-lang says "designed in 2004", ecere says "founded in 1997", both point to https://github.com/ecere/ecere-sdk https://github.com/ecere/ecere-sdk - unsure what to make of this - https://github.com/ecere/ecere-sdk/blob/master/LICENSE https://github.com/ecere/ecere-sdk/blob/master/LICENSE is BSD 3-clause (revised) - some of the demo screenshots on the ecere website list something called "GNOSIS", a closed-source 3D library (with free educational licensing) also written by the project authors - the GitHub repo lists forks of emscripten ("This branch is even with kripken:master.") and binaryen ("This branch is 2 commits ahead, 35 commits behind WebAssembly:master.")
- m-j-fox 9y agoI'll try anything once ... But I'm curious: what's the headline feature? Like Go has their channels, Python has duck typing, Haskell is pure and lazy. What is EC's raison d'etre?
- pakl 9y agoIf this interests you, you should also check out carbon co2, a lightweight object-oriented addition to C (https://github.com/peterpaul/co2/ https://github.com/peterpaul/co2/). Code example: https://github.com/peterpaul/co2/blob/master/examples/my-object-carbon/test/TestMyObject.co2 https://github.com/peterpaul/co2/blob/master/examples/my-obj...
- zakk 9y agoI have been looking for a long time for a C-like language, with a small number of object-oriented features and support for some functional primitives. The closer I got is Rust, but I really hate the borrow system, I suppose I could program in unsafe Rust. The alternative is C++, which feels too broad and complex, so I am sticking to C.
- mhh__ 9y ago<evangelism> Sounds like you might like D (dlang.org). It does C better than C, has functional features without being as ridiculously complex as C++. </evangelism>
- zakk 9y agoI was well aware of the existence of D, however I always thought of it as an extension of C++, so being more complex and more bloated. Clearly I was wrong, and I spent the last hour playing with D! Many thanks for your advice!
- zakk 9y agoI was well aware of the existence of D, however I always thought of it as an extension of C++, so being more complex and more bloated. Clearly I was wrong, and I spent the last hour playing with D! Many thanks for your advice!