Apple says it best:
"If you are used to using strongly typed languages, you might think that the use of weakly typed variables would cause problems, but they actually provide tremendous flexibility and allow for much greater dynamism..."
I've always felt the same way. Its a different mindset but I wish it was more prevalent.
Subscribe to:
Post Comments (Atom)
Productivity and Note-taking
I told a friend of mine that I wasn't really happy with the amount of time that gets taken up by Slack and "communication and sched...
-
Update : Here are slides for this talk at OttawaJS: " Node.JS Module Patterns Using Simple Examples ". Update 2 : More Node.JS M...
-
tldr; https://github.com/73rhodes/sideflow This extension provides goto, gotoIf and while loop functionality in Selenium IDE. Selenium ...
-
Other articles in this series: REST API Best Practices: A REST Cheat Sheet REST API Best Practices: HTTP and CRUD REST API Best Practice...
2 comments:
I don't see what's so wrong with me making a call to str() if I want to be comparing a string, rather than letting the interpreter convert types at will. It leads to all sorts of bugs (I've seen some nice examples in PHP of comparing "true", "false", true and false).
Hi Xiong,
There is nothing wrong with strong typing per se. It's designed to protect programmers from certain basic mistakes. In practice, these kinds of mistakes are easy to find and fix, though. Also, test-driven development is really a better way to do functional validation than compile-time errors. To see the benefits of dynamic typing, you need to use it a few times in a language like Lisp, Objective C or Javascript.
Happy coding!
Post a Comment