Sure, 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.
Not 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.
Interesting. 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).
With a modern IDE though, once you discover the error of your ways and do start using OOP. You can click on a few methods and do an "extract class" and it will automatically create your class, modify all of your references, find all of the referenced variables that your functions use and give you nice helpful auto refactorings and you know that your code won't break.
But as far as using C++ and not using OOP, as thevold saying goes, you can write FORTRAN in any language.
I think OOP (precisely inheritence) makes programming more difficult even if OOP works for 80% of the cases. The last 20% are impossible to handle with that pattern and make a class hierarchy unstable.
I think Smalltalk is the most productive language because of its VM (builtin IDE, DB...) and not because of OOP.
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.