> Not totally sure what you mean by having functions allow
> copy-by-reference. Something else/in addition to ref()?

Basically, ref() does it all. I meant like... how in c++:
void doX(int &x) {}
...passes in a reference to x, without forcing the programmer to learn anything 
about pointers, and very little about references. The ref() you described 
sounds a lot more like:
int *x = &y;
...which has pointer semantics. The "&" functional ref in c++ only applies to 
the scope of that function, so there's less room for confusion, and it covers 
one of the major uses for pointers (passing large or complex parameters into 
functions).


> We already have a 'replace char' command, although I
> suppose it could be dumped. But that sounds like a trap to me. 
The standard OHR's developers would know better than I what the community 
wants. What I like from Java is the theoretical distinction between char[] 
arrays and Strings. It's something like:
1) Strings are used to represent text, and are unique, and follow the semantics 
I described earlier. So, yes, "replace char" has to return a totally new string.
2) char[]s are arrays, so do whatever you want with the elements. 
3) You can easily convert one to the other, if you need to alternate between 
the fine-grained control of char[] and the useful functionality of Strings.

Anyway, this point is very, very moot if strings have IDs that the user 
manipulates. The language needs to have some high-level abstractions before fun 
intuitive tricks like this work.


Henceforth was my attempt to balance high-level programming with a low-level 
interpreter, but I still haven't addressed strings in the HVM. So, I'll 
probably have to follow your lead on this one, and integrate whatever the 
community decides on. Sorry I couldn't be more help.

-->Seth



      
_______________________________________________
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org

Reply via email to