4 ms·
"dynamic and functional" I don't understand what you've said here. The two terms are entirely orthogonal. There are functional langauges which are dynamically
by rpearl 14y ago
"dynamic and functional"
I don't understand what you've said here. The two terms are entirely orthogonal. There are functional langauges which are dynamically "typed", and there are functional languages which are statically typed. Lumping the two terms together is misleading and useless.
Static typing (done correctly) is just straight up better than dynamic typing. End sentence. I cannot count the number of times I have had errors at runtime working in python that simply would not have existed at all if I was using a statically typed language. With a sufficiently expressive type system, the types do not get in the way, but you still get compile-time enforced correct static semantics.
- 23david 14y agoI agree. Static typing is great. I don't know why all these scripting languages choose to throw out static typing. If a variable is always going to be an integer I don't know why its important to be able to stick characters, strings or objects into it without seeing any errors. It's good for a beginning programmer perhaps, but even with that I tend to disagree since it encourages bad practices. At some point I just got tired of seeing the same types of errors and wanted my tools to work a lot better. Python / PHP / Ruby aren't improved by lacking static types. How hard would it be to add static types into PHP, Ruby, or Python? http://stackoverflow.com/questions/1365333/will-php-become-a-full-fledged-statically-typed-oop-language-in-the-near-future http://stackoverflow.com/questions/1365333/will-php-become-a...
- eranation 14y agoI'm a big static typing fan, but the facts are out there, startups use Rails and Django, and front end is JavaScript, all are dynamically typed, yet very popular. A good static typed language that the only difference between it and Ruby / Python is the type system, has a good chance in being accepted by a larger audience of developers, both enterprise and startups. People prefer dynamic as they don't like to compile, and it provides rapid code / refresh cycles, I don't think anyone would say no to less bugs and better refactoring, and to self explanatory APIs using content assist.
- joshAg 14y agowhat languages, if any, do you think get static typing right?
- rpearl 14y agoHaskell and SML both have sufficiently expressive type systems that I do not ever find myself writing correct code that fails to typecheck. If the code fails to typecheck, I have done something wrong. (If the code does typecheck, then I have guaranteed a lot of static properties of my code, but it may still be incorrect in terms of dynamic semantics.)
- eranation 14y agoI meant to say "more inclined toward dynamic over static, functional over object oriented." didn't mean to tie functional and dynamic together, thanks for the clarification. Scala is a great statically typed functional, object oriented language, which allows most people to enjoy both worlds.
- eranation 14y agoBy the way, I agree with all you said, I hope it's evident I'm a big static typing fan.