Re: Digest for EUforum at topica.com, issue 6333
- Posted by Matt Lewis <matthewwalkerlewis at gmail.com> Jan 09, 2007
- 515 views
Chris Bensler wrote: > > Matt Lewis wrote: > > > > Chris Bensler wrote: > > > > > > var_list[1] = init_var_list(1,{x,y,z}) > > > > > > The result of that statement is undefined in Eu. > > <snip> > > > Yes, the behaviour of side-effects has always been undefined, but until > > > v2.5 > > > I had always just assumed that things were evaluated left to right (RHS > > > first, > > > then LHS), > > > > Which was a dumb thing to do. Rob has often told people not to rely on > > things that are undefined. And it's a good idea in general. It's stuff > > like that which gives us the backwards compatibility nightmare that is > > Windows (read Raymod Chen's blog for plenty of examples). > > > > It might have seemed reasonable at the time, but please don't complain to > > us when something like this bites you. > > I used myself as an example. > I was making a point about predictability and logical behaviour. > I hardly think I was alone in thinking how expressions are evaluated. > This discussion was based on me pointing out to Jason that there was an issue > with side effects at all, so obviously I'm not the only one. > Please don't give me that crap about whining what I want, because I have never > ever been selfish with my motivations for improving Euphoria. Sorry, I didn't mean to imply that you were selfish or anything, just that you found something that was weird, but as Pete points out, doesn't really make sense, and began relying on it. > > Other than a debugger, how does the IL help programmers to debug their code > and > how does that have to do with the $ shorthand? There's no mystery as to what's going on. You could look and see exactly what's going on. It's just like looking at the assembly of a compiled program. You can't necessarily debug it by just looking at the c source without seeing the low level details. > > > consider: > > > s[3].do_something() > > > > > > What type of object is s[3]? > > > How do you propose to evaluate that at compile time? > > > > There is the concept of "sequence of ..." which could handle this case. > > I beleive 'sequence of' would only handle heterogenous arrays. That doesn't make sense to me. I thought that the whole point of a 'sequence of' syntax was to specify more detail about the contents of a sequence, which means homogeneous arrays. Maybe you're referring to something like what Karl was talking about with a structured sequence? > > Also, the way of casting would be: > > > > my_class.do_something(s[3]) > > > > which seems pretty clear to me. > > See my reply to ags, regarding casts.. > http://www.listfilter.com/EUforum/m11818.html I agree with what he (or someone else who responded to this post) said, which is that your proposal adds a lot of verbiage, but doesn't contribute much to clarity. Matt