4 ms·
Dynamic languages have jumped the shark
- gvickers 13y agoYou have weak and dynamic typing confused.
- shizzy0 13y agoThe 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.
- kyllo 13y agoThis. 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
- programminggeek 13y agoRuby 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.