Re: Missing features in Euphoria
- Posted by mattlewis (admin) Jul 29, 2014
- 1531 views
- Lack of reference semantics
- Lack of pointers
I'm not totally convinced that the pros outweigh the cons for this. But note that using std/eumem.e /is/ using pointers to a heap stored in a sequence, along with all of the problems that come with "normal" pointers. To me, the best argument for native reference semantics (vs eumem) is performance. There are some hacky workarounds to get good performance when modifying data stored in eumem.
Also, the existence of our delete routine stuff could make debugging a lot easier. IOW, we already have hooks for when euphoria objects are dereferenced, and we could (optionally) supply a default hook to track this sort of thing, say when with debug is in effect. We could do additional instrumentation / logging to produce something similar to what valgrind gives to C/C++.
Matt