News for hackers. Stuff that matters.
Re:Dynamic languages have jumped the shark by shizzy0 on Friday May 31, 2013 @10:25AM (#5798784)
The criticism of ENV only allowing strings has no bearing on his argument. ENV comes from the OS environment. Code in any other language--strong or weakly typed--would have the exact same issue. And not being able to coerce arbitrary strings to booleans is fine because there is no principled way to do that except through convention. And everybody makes up there own convention: true, yes, YES, OK, TRUE, ok, ON, ENABLED, which just goes to show that there's no principled way to do it.
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.

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

Re:Dynamic languages have jumped the shark by gvickers on Friday May 31, 2013 @10:15AM (#5798710)
You have weak and dynamic typing confused.
Re:Dynamic languages have jumped the shark by programminggeek on Friday May 31, 2013 @11:22AM (#5799121)
Ruby has strong types, you can and should use them.

If you want type checking, use it.

Also, if Rails has security problems, stop using it.

Scala and Haskell have their own flaws. There is no magic bullet.