1. Re: Digest for EUforum at topica.com, issue 6333
- Posted by Chris Bensler <bensler at nt.net> Jan 09, 2007
- 531 views
Matt Lewis wrote: > > Chris Bensler wrote: > > > > 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. Again. It was an example only. It's not a matter of what a person would rely on, but what you would logically expect. Following codeflow, you should be able to read the code and follow what is happening. That was more or less possible before. Now we have to scrutinize every assignment to be sure it won't cause side effects. Fine, yes, it would be better to split the statement anyways, regardless of the presence of the $ shorthand, but who does? I don't depend on it, but I really don't want to have to think about it so much either. I'm SURE I'm not alone in having made that assumption. I'm sure, other than the fact of it being brought up. The majority of people are entirely unaware of any problem at all. I'm curious what other languages have problems like this with side effects. If I had discovered the problem with side-effects when I began using Eu, I probably never would have even persued 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. I've been debugging programs without IL for 8 years now. Eu is not C. Do you ever have to look at low level code when you use PHP or python or Perl, etc? > > > > 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? Sorry, I meant homogenous. > > > 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.. > > <a > > href="http://www.listfilter.com/EUforum/m11818.html">http://www.listfilter.com/EUforum/m11818.html</a> > > 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. I don't think I've made any proposals in all of the recent threads about SS and oop, etc. I've been trying not to at least. I have my own ideas, and I've no dilusions of convincing people of them. Instead I've been trying to caress how other people are thinking about these problems. The casting syntax I used in the examples for AGS were just from the top of my head and are no more verbose than the casting syntax you demonstrated. I saw no replies mentioning it either. I think you may be thinking of a different post and poster. Chris Bensler ~ The difference between ordinary and extraordinary is that little extra ~ http://empire.iwireweb.com - Empire for Euphoria