5 ms·
#1 issue is lack of strong typing. I don't understand the appeal of dynamic languages. Worse performance, more overhead, harder to read...
by exabrial 9y ago
#1 issue is lack of strong typing.
I don't understand the appeal of dynamic languages. Worse performance, more overhead, harder to read...
- gnaritas 9y agoGood enough performance, overhead is fine, easier to read, faster development time, vastly easier exploratory prototyping abilities, dynamic patterns available that can't be done at all in static languages like meta classes and dynamic message interpretation via late bound message passing. If you don't understand the appeal of dynamic languages, it's likely because you still program like you do in a static language while in them and you're ignoring the new things you can do that you couldn't in a static language. Static types are handcuffs, they prevent all kinds of perfectly valid code that work fine in dynamic languages. Static types ensure you don't make certain kinds of mistakes, but the cost of doing that is forbidding valid code that can't be verified at compile time to be correct, even though it'd work fine at runtime. I want to tell the computer what to do in the simplest form possible, I don't want the computer telling me what to do, and I don't want to have to decorate my intentions with a bunch of unnecessary type fluff to make a compiler happy, and I certainly don't want the compiler telling me I can't do something I know will work perfectly fine just because it can't be statically verified.
- wootness 9y agoDefinitely not faster development time. At all. For larger projects, dynamically typed languages fail very quickly. And modern statically typed languages have dynamic features, making dynamic languages obsolete.
- z3t4 9y agoyou dont have to wait ten hours to see if it works, you just hit "refresh" and you see the changes you did instantly. most obvious errors that a strongly typed language protects you from are caught by the vm at runtime. then you rely on testing, both automatic testing and manual testing. in a dynamic language you dont have to decide between float or int. your code gets less verbose and you can concentrate on good naming and making the code easy to understand, instead of choosing the right type. also you can have functions that accept many types, which gives you more flexibility and freedom.
- Joeri 9y agoI've spent years on both sides of the fence, PHP and Java. In my experience php wins out for prototyping and smaller or short-lived projects, because you can type up something quickly without boilerplate, but java is better for large long-lived codebases. The improved maintainability that a strictly typed language gives you becomes the dominant factor when 80% of time is spent maintaining or extending existing code.
- paulredmond 9y agoSome fair points, but strict typing doesn't mean the codebase is bullet-proof. I've seen upgrades take months on both PHP and Java projects due to poorly maintained and poorly tested code. It's the operators not the tool that have the biggest impact on maintainability regardless of the language.
- wcummings 9y agoAs someone who writes java every day for work but deep down loves dynamic languages: Static typing has value, but it's massively overstated IMO. Type-checking will only catch the most obvious bugs. Type-checking is mostly redundant with the tests I'm writing anyway, its pretty unlikely that a type error would ever make it to prod, so the benefits seem pretty questionable to me personally.
- TazeTSchnitzel 9y agoPHP has a sort of middle-ground now, which is runtime-enforced type declarations, which you can check offline with a separate utility or an IDE if you like.