Skip to main content

Posts

Showing posts with the label types

What are the benefits (and drawbacks) of a weakly typed language?

I'm a big fan of PHP and it's obviously a very weakly-typed language. I realize some of the benefits include the general independence of changing variable types on the fly and such. What I'm wondering about are the drawbacks. What can you get out of a strongly-typed language like C that you otherwise can't get from a weakly-typed one like PHP? Also with type setting (like double($variable)), one could argue that even a weakly-typed language can act just like a strongly-typed one. So. Weak-type. What are some benefits I didn't include? More importantly, what are the drawbacks? Source: Tips4all