in reply to Re: Help! My variables are jumping off a cliff!
in thread Help! My variables are jumping off a cliff!
Could you define "declarative suicide", please?
I'm also not very clear on why you'd consider the problem that I'm demonstrating as an example of "kamikaze coding". Imagine a script in which you've already declared a lexically-scoped $foobar; a couple of hundred lines later, you decide that you need a new variable name, and $foobar seems like a reasonable thing. Create it, and - presto - you've destroyed the previous one. Is that "kamikaze coding"? Or is it a language problem?
#include <stdio.h> int main(void) {int x = 1; int x = 10; printf("%d\n", x);}
ben@feynman:/tmp$ cc x.c x.c: In function ‘main’: x.c:3:33: error: redefinition of ‘x’ x.c:3:22: note: previous definition of ‘x’ was here
-- I hate storms, but calms undermine my spirits. -- Bernard Moitessier, "The Long Way"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Help! My variables are jumping off a cliff!
by Jenda (Abbot) on Feb 26, 2012 at 14:26 UTC | |
by oko1 (Deacon) on Feb 26, 2012 at 15:36 UTC | |
|
Re^3: Help! My variables are jumping off a cliff!
by tangent (Parson) on Feb 26, 2012 at 04:48 UTC | |
by oko1 (Deacon) on Feb 26, 2012 at 05:05 UTC | |
by tangent (Parson) on Feb 26, 2012 at 05:15 UTC | |
by oko1 (Deacon) on Feb 26, 2012 at 05:31 UTC | |
by Anonymous Monk on Feb 26, 2012 at 06:27 UTC | |
|
Re^3: Help! My variables are jumping off a cliff!
by muba (Priest) on Jan 29, 2013 at 04:39 UTC |