Re: Is Euphoria ever going to be newbie-friendly?

new topic     » goto parent     » topic index » view thread      » older message » newer message

I have learned many things working on this project but a key thing is that Euphoria's core language encapsulates memory management, adding things in the C back end breaks that encapsulation and increases the probability of more nasty machine exception style bugs to occur.

Compiling time type checking is something I attempted with the alternative literals branch but it is really a limited idea. For example, the Interpreter ought to have a mechanism to know that a regex flags can be combined with bitwise operations and only such values should be allowed on the fourth argument to regex:find but such values should not be allowed in the thrid argument (which is for the offset). There is no way to do this in Euphoria. You can communicate this to a C + + compiler, to Java, and a like.

At the machine level, and at the Euphoria level regex flags and offsets are the same kind of thing but conceptually these have different purposes and you can wrap them into C+ + classes and use Operator Overloading and all of these kinds of bugs give you an error when compiling.

If we could take the structure idea from C: (except use Euphoria objects as members not C types), Some/Any/None from Rust, and strict types with OO of C+ +, then we would have the best of all worlds.

I am currently looking into Rust. It's offers even more kinds of compiling checking than C+ +.

Shawn

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu