8 ms·
It is known by studies. People are more comfortable and productive with dynamically typed languages. The most productive language is smalltalk.
by mabynogy 9y ago
It is known by studies. People are more comfortable and productive with dynamically typed languages. The most productive language is smalltalk.
- scarface74 9y agoHave these "studies" taken into account maintainability? There is a whole class of bugs that won't happen with a statically typed language. There also a whole class of automatic refactors that you can do with statically typed languages.
- mabynogy 9y agoIt's about productivity not correctness.
- scarface74 9y agoHow can you be "productive" writing code that isn't "correct"? That's the worse type of developer - the one who does "negative work". Negative work is when someone does work so badly that it takes more time to correct their errors than it would have for them not to do the work at all.
- mabynogy 9y agoYou're talking about you and your opinions. For a given task, random programmers are quicker at achieving the goal with dynamic programming languages. That's why scripting languages are popular. They are also easier to learn.
- scarface74 9y agoHow could it be a "goal" to have incorrect code?
- mabynogy 9y agoYou're dishonest. The goal is to measure productivity.
- scarface74 9y ago"Productivity" in the real world is how long does it take me to get to a working solution. A solution that isn't correct isn't working.
- mabynogy 9y agoIt's a sophism. That's what they did.
- bwbw223 8y agoSure, but it doesn’t scale well. Static-typing makes code easier to come back to a year later or collaborate on because it’s more self-documenting. You don’t have to dig through the codebase to figure out that a function should have only accepted a number, because the interpreter/compiler would have screamed at you the moment you try something else. Scripting languages may be easier to learn, but they aren’t as scalable and efficient. In requiring less scaffolding and structure, they’re not as well suited at creating correct code in large codebases. They’re still great for prototyping, though.
- scarface74 8y agoNot only correct code, but refactorable code. With statically typed languages, you can use tools like Resharper and do all types of refactorings that are guaranteed safe - unless you're using reflection I've softened a little bit about scripting languages. They are great for small functions like AWS lambdas and "scripting" like the UserData portion when you're setting up a VM in AWS.
- mabynogy 8y agoBoth static and dynamic typing are useful. They should be available in the same language but that language doesn't exist yet.
- scarface74 8y agoIt does exist. You can define all of your variables as "dynamic" in C#.
- mabynogy 8y agoInteresting. It looks like a variant or an object whose type list is only known at runtime. What I have in mind is a language able to convert functions calls from dynamic to static (and the opposite). If the compiler can infer the type, the call is static else dynamic (with multidispatch for function overload).
- steveklabnik 9y agoDo you have those studies handy? The ones I’ve seen have been inconclusive.
- mabynogy 9y agoThe one I've seen with smalltalk shows that clearly. I'll repost it if I can find it. IMO about smalltalk, it's not just because of dynamic typing but also because of the builtin IDE, VM and DB.