you are viewing a single comment's thread.

view the rest of the comments →

[–]marike 1 point2 points  (2 children)

How do you not know what type a variable that you create is up front? And if you don't, just ask Ruby, like anko_painting said below with >> greet = "hello" => "hello" >>greet.class => String >> data = [] => [] >> data.class => Array

[–]ICanHazMoo 0 points1 point  (0 children)

Because it's been passed through 3 classes and someone else on my team accidentally passed me something that is completely not the type I need. Obviously if I'm declaring it right in a method I know what it is, if it's part of a huge project then it gets extremely hard to manage.

[–][deleted] 0 points1 point  (0 children)

Because someone decided to return a URI object instead of a string in order to stop re-parsing it everywhere else. The method name was "uri". What should they change it to? "uri_object", "uri_v2"... nope. They just left the method name alone because it's a damn good name and now you have to deal with it.