in reply to Re^4: What would you change?
in thread What would you change?
That results with "Not enough arguments for vec()." And, illustrates in brilliant colors the stupidity of compile-time checking in a dynamic language.my $thing = 'a' x 10; my @params = ( 2, 3 ); vec( $thing, @params ) = 0;
Frankly, if we wanted to have compile-time checks, we should be telling the compiler what we expect to happen. So, for example, if @params should have 2 and only 2 things, we should be able to say that. Then, vec() knows that if @params makes it to him, it's got two things. But, even that sucks because you'd have to assign two things to @params - you wouldn't be be able to build it up using push.
So, compile-time checks suck.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: What would you change?
by BrowserUk (Patriarch) on May 19, 2008 at 20:57 UTC | |
by ikegami (Patriarch) on May 20, 2008 at 00:40 UTC | |
by BrowserUk (Patriarch) on May 20, 2008 at 00:45 UTC | |
by ikegami (Patriarch) on May 20, 2008 at 06:31 UTC | |
by dragonchild (Archbishop) on May 20, 2008 at 00:08 UTC | |
by BrowserUk (Patriarch) on May 20, 2008 at 00:39 UTC | |
by dragonchild (Archbishop) on May 20, 2008 at 02:51 UTC | |
by BrowserUk (Patriarch) on May 20, 2008 at 03:26 UTC |