Ecere SDK/eC Forums • View topic - Multi inheritance or interface in eC

Ecere SDK/eC Forums

Ecere Developers Community

Multi inheritance or interface in eC

General help with the eC language.

Re: Multi inheritance or interface in eC

Postby jerome » Wed Oct 02, 2013 1:02 am

Yes, though I hope to add more features to eC (e.g. to support functional paradigms), I hope it remains simple, with one 'proper' way to do things which the language naturally guides you to use, versus what I see as many wrong ways to do things in C++.

Objects on the stack -- you can use structs in eC to create objects on the stack.

eC guides you here by making a decision when you design a type: you decide whether these objects should be allocated individually on the heap or on the stack (or contiguously in arrays). And this ensures that anyone using your type will not wonder whether he should be using them on the stack or on the heap, the type makes the decision.

Objects that structs are good for are small objects without references to other objects that would need to be released upon destroying the struct ( eC structs don't have destructors , at least so far ).
Site Admin
Posts: 623
Joined: Sat Jan 16, 2010 11:16 pm


Return to eC Language

Who is online

Users browsing this forum: No registered users and 0 guests