Originally posted by Tupac Shakur
View Post
Announcement
Collapse
No announcement yet.
Ruby on Rails [nerd thread]
Collapse
X
-
At my last job somebody was telling us how awesome dynamically typed languages are, I forget the context of this (probably somebody trying to sell us something).
Him: They're so much faster to program in because you don't need to put in the variables' types - you just say that your function accepts a variable "x" and then people can send in a number, or a string, or an array, or whatever!
loin: What if you only want them to send in a specific type, like a number?
Him: Oh, well then you need to include a lengthy guard statement and throw a runtime exception that probably can't be handled in any meaningful way, so rather than catching the bug at compile time you instead crash your program. But c'mon, how often are you going to write a function that only accepts variables of one type?<p style="font-size:1024px">HTML is disabled in signatures </p>
Comment
-
Dynamically typed languages are convenient for small things, but for this assignment I'm doing right now, which is writing unit tests (BORING), about 90% of these would be completely pointless if I were just using a statically typed language.If there is no sound in space, how come you can hear the lasers?
){ :|:& };:
Comment
Comment