|
 |
Darren New wrote:
> You know, it's not all that hard to accidentally carry over incorrect
> state in a language without mutable state, too. :-)
Heh. Do you have *any idea* how long it took me to finish debugging this
JavaScript snippet?
function Bindings_Lookup(key)
{
if (this.Key == key) return this.Value;
this.Next.Lookup(key);
}
It took an absurd amount of time to figure this out - especially given
the strange way Firefox responded to it...
Sure, they'll never make a programming language where mistakes are
impossible. But mutable state just offers *so many* ways to shoot
yourself in the foot. :-/
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|
 |
Invisible wrote:
> Sure, they'll never make a programming language where mistakes are
> impossible. But mutable state just offers *so many* ways to shoot
> yourself in the foot. :-/
I don't understand what that has to do with mutable state, since you're
not mutating anything there. It looks like you have the bug of too much
recursion and the bug of not checking for the end of the list, assuming
I'm reading it right.
And yes, firefox seems to crash my machine at least once a day, which is
rather annoying. I've taking to running anything on a remote machine
that takes more than 5 minutes as a nohup job, just in case my machine
locks up.
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
Post a reply to this message
|
 |