1. RE: Euphoria Language Changes
- Posted by bensler at mail.com Jan 19, 2002
- 414 views
I tend to agree with this. If you want to pass a value through a routine, use a function. HOWEVER, referenced variables for type defines could be quite useful.. We would be able to do parameter formatting, and keep the syntax checking out of our routines.. If I could get assignment on declaration, the slicing shortcut I mentioned in my previous post, trailing comma support for variable declarations(this one I could do without), and referenced variables for type defines, I would gladly pay another $40 or more to have it. That would be enough modifications to warrant commercial distribution I think.. Oh yeah, add support for viewing sliced sequences in the trace facility. Is that part of the source? Or would that comprimise the PD limitations? Chris Shawn Pringle wrote: > Pass by reference in Euphoria? One of the things that has made Euphoria > > different and I think easier is it's pass by value policy. > Before implementors remind me "it is not really pass by value"... I know > > it is copy on write I am refering only to how it looks to the language > definition only not if it actually does memcpy all over the place. > > Basically I like EUPHORIA's behavior the way it is NOW. Nothing is > modified on the right hand side of the assignment operator. Pass > valueable information into any function or procedure and not worry that > data is accidently modified when it shouldn't. It also makes EUPHORIA > an ideal learning language. EUPHOIA objects returned can be of > unlimited size and structure why pass by reference? only to modify > things in place. > > > Regards, > Shawn Pringle > >
2. RE: Euphoria Language Changes
- Posted by kbochert at ix.netcom.com Jan 20, 2002
- 424 views
-------Phoenix-Boundary-07081998- Chris Bensler wrote on 1/19/02 7:15:16 PM: >If I could get assignment on declaration, the slicing shortcut I >mentioned in my previous post, trailing comma support for variable >declarations(this one I could do without), and referenced variables for >type defines, I would gladly pay another $40 or more to have it. That >would be enough modifications to warrant commercial distribution I >think.. I have modified my Euphoria source to add: 1) Variable initializations 2) Slicing shorthands 3) String-aware '?' 4) Pass by reference Example: sequence test1 = "abc", test2 = "zot" procedure swap (sequence s, sequence t) object x x = s[2] s[2] = t[2] t[2] = x end procedure swap (!!test1, !!test2) -- '!!' causes pass-by-reference ?test1 -- prints "aoc" ?test2 -- prints "zbt" ?test2[2..] -- prints "bt" What do you mean by 'referenced variables for type defines'? Karl Bochert -------Phoenix-Boundary-07081998---
3. RE: Euphoria Language Changes
- Posted by kbochert at ix.netcom.com Jan 20, 2002
- 415 views
-------Phoenix-Boundary-07081998- You wrote on 1/19/02 7:15:16 PM: > >If I could get assignment on declaration, the slicing shortcut I >mentioned in my previous post, trailing comma support for variable >declarations(this one I could do without), and referenced variables for >type defines, I would gladly pay another $40 or more to have it. That >would be enough modifications to warrant commercial distribution I >think.. >Oh yeah, add support for viewing sliced sequences in the trace facility. >Is that part of the source? Or would that comprimise the PD limitations? > >Chris I have modified the source to provide: 1) Variable initialization. 2) String-aware '?' operator 3) Slicing shorthands. 4) Pass by reference. Next up: structures (sequences with named elements) and dot-notation. sequence test1 = "abc", test2 = "zot" procedure swp (sequence s, sequence t) object x x = s[2] s[2] = t[2] t[2] = x end procedure foo (!!test1, !!test2) -- '!!' invokes pass-by-reference ?test1 -- prints "aoc" ?test2 -- prints "zbt" ?test2[2..] -- prints "bt" Karl Bochert -------Phoenix-Boundary-07081998---