Re: Rob: Q: Euphoria 2.6

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

jacques deschĂȘnes wrote:
> 
> 
> Hayden,
> May be you should code in C.  The idea behind a high level language like
> euphoria
> is to avoid any pointers and memory management trouble. In my opinion memory
> allocation and structure should be only used to interface to the windows API
> and hidden inside the wrappers library like win32lib and others do.
> 
> regard,
> Jacques d.
> 

 From a theoretical standpoint, I agree.
For this approach to be practical, there should be wrappers for _every_ 
low level OS dependant stuff an Euphoria programmer may have to deal with. 
Sorry, that's not the case as of today, and probably never will.

The OpenEu specs call for a full set of raw memory management commands. They 
don't create Euphoria objects, just placeholders for various known memory
storage types
like strings, counted strings and a lot more; the only interface between
these raw mem objects and the language is assignment both ways. 
These primitives are intended only for interfacing with the host machine, 
and most serious programming has to deal, in a limited way, with that.

Eu has quite a few instructions to implement pointers or deal with pointers.
The only thing I happened to need would be an allocate_at(location,size) new 
primitive so as to handle and manage raw memory blocks better.

If you don't have pointers, then some kind of variable_id(), get_var(id) and
set_var(id,value)
is needed. Thus, you get the flexibility of C and the safety net of Eu.
But having neither these nor pointers is a real issue in Eu.

CChris

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

Search



Quick Links

User menu

Not signed in.

Misc Menu