Re:Dynamic languages have jumped the shark
by kyllo on Friday May 31, 2013 @10:42AM
(#5798886)
This.
Note that Java main methods start with
public static void main(String[] args){}
The main method takes an array of String objects from the command line as an argument. You can't pass a boolean or anything other than a String in args any more easily in Java than you can in Ruby.
But Ruby and other dynamic languages give you eval which, although dangerous, can have the effect of coercing your string into a boolean.
Note that Java main methods start with public static void main(String[] args){}
The main method takes an array of String objects from the command line as an argument. You can't pass a boolean or anything other than a String in args any more easily in Java than you can in Ruby.
But Ruby and other dynamic languages give you eval which, although dangerous, can have the effect of coercing your string into a boolean.
irb(main):001:0> a = "true"
=> "true"
irb(main):002:0> b = eval a
=> true
irb(main):003:0> b
=> true
irb(main):004:0> !b
=> false