Coffeehouse Post

Single Post Permalink

View Thread: is managed code faster than native?
  • User profile image

    PHP is weakly typed. Weakly typed is when a language does bad(tm) things instead of failing (either at compile or runtime) when it encountered a type mismatch. I'm pretty sure any scary example from PHP you can come up with takes advantage of this.

    Ruby and Python are fairly strongly typed, but dynamic. Again you can have "static" and weakly typed, like what pointers are in C. The type of a pointer is merely a suggestion. Heh. Also, rich type systems, like were a string is not just a f'ing pointer is helpful. These are were the REAL problems occur in robustness. Not in duck typing, and certainly not as values-as-types. Duck typing has almost no real disadvantage that I can see, and values-as-types can be considered syntactical sugar at best.

    I don't disagree that weakly typed is a bad idea, I think you might be arguing against weakly typed stuff, which commonly is confused for dynamically typed stuff, because many dynamic languages happen to be somewhat weakly typed (PHP and JavaScript are no exception). So lets just agree that strongly typed languages are preferable.