in reply to == and != don't work as expected
versus:my $string = 1; $string = "code"; # we can reuse the variable name
You will find this paradigm called DWIM (Do What I Mean) by a lot of people. Basically, part of the price we pay for DWIM is that the interpreter doesn't choke and die on ambiguities, but makes a best guess.char* mystring = "this is a C style string"; int myInt = 1; // Can't reuse variable names // plus need to declare the type
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: == and != don't work as expected
by chromatic (Archbishop) on Aug 09, 2004 at 17:23 UTC | |
by Vautrin (Hermit) on Aug 26, 2004 at 14:14 UTC | |
by chromatic (Archbishop) on Aug 26, 2004 at 17:18 UTC | |
by Vautrin (Hermit) on Aug 27, 2004 at 15:51 UTC | |
by chromatic (Archbishop) on Aug 27, 2004 at 16:34 UTC |