From: <lm...@bi...> - 2009-05-08 16:15:15
|
On Fri, May 08, 2009 at 04:51:31PM +0200, Lars Hellstr?m wrote: > Larry McVoy skrev: > >On Fri, May 08, 2009 at 12:05:14AM +0200, Lars Hellstr?m wrote: > >>Larry McVoy skrev: > >>>It's a fine idea but go look at what the other > >>>languages do and why > >>Since you bring it up: Pray tell, *why* do they do what they do? The > >>two main reasons AFAICT are: > >> > >>1. It's what the other languages do. > >>2. It's what happens at the level below (i.e., one step closer > >> to the silicon). > >> > >>Neither is much of a philosophical principle, but perhaps you have > >>spotted some deeper meaning underlying the mainstream practices? > > > >Try reading this: > > > > http://www.perl.com/pub/a/2007/12/06/soto-11.html > > > >and if you get it, great, but if not, I'm really too busy to be dragged > >into the discussion, I shouldn't have brought the EIAS crap up, my mistake. > > Well, the article is interesting (pages 2-3 anyway; page 1 is just > narrative), but it fails to address the issue you brought up, so if > there was a pertinent reference you wanted to cite as evidence that Tcl > is missing something all other languages has gotten right, then this > wasn't it. > > The closest it gets to the issue is the statement (in the page 1 > dismissal of Tcl) that "The string metaphor tends to have bad > performance ramifications," but since the author also claims Tcl lacks > a decent extension mechanism ([load], anyone?), it would seem he is > talking more about the situation in Tcl7 or earlier than about Tcl8. > > Then again, perhaps the "get it" clause of yours is an elaborate way of > saying "Ha ha, only trolling!"? I already said I shouldn't have brought it up, and that I don't really have time to argue about it, and that no matter what I say it's like preaching atheism in church. The trolling comment is predictable but doesn't make the point any less (or more) valid, it just encourages "nah nah, I'm right, you're wrong" and who wants to go there? I think the fundamental flaw with EIAS is that there are no identities. That causes all sorts of problems because in tcl set foo "hi there" set bar "hi there" if {$foo eq $bar} { puts "always true" } but there are lots of cases where you'd like to know if foo is actually an alias (upvar, whatever) to bar or if it happens to contain the same contents as bar. In tcl, you're pretty much screwed if you care about that question. I suspect that Donal had a few issues with this in the OO layer, haven't looked. This is the root of the whole NULL thing, you can't tell if "" is different from "" so using an empty string for NULL doesn't work. There are lots of other examples, but I think they all simplify down to not being able to do an identity comparison, tcl is limited to a content comparison. The reason I posted about the undef hack is that it opens up your mind to using the same idea for other places where you might care about that sort of information. Memory debugging for example, which currently is quite hackish. That's really all I want to say about this, if you want to come back and tell me I don't get it, great, then I don't get it. That's fine and we'll leave it at that, or I will at least, I've got too much on my plate at the moment to preach to an unreceptive audience. -- --- Larry McVoy lm at bitmover.com http://www.bitkeeper.com |