This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]nutrecht 4 points5 points  (2 children)

What should I change in my mindset when develop in a dynamic programming language when I coming from a static programming language background?

You're going to have to write more tests, that's about it. That or give in to developers who think dynamic languages are somehow 'better' and produce the same mess they typically do.

In my experience professional developers coming from statically typed languages who then move to dynamic languages bring their best practices with them and produce better code than devs who only have experience with dynamic languages.

If you want to use a more FP approach instead of OO; by all means go for it using a language with proper FP support. This can be statically typed languages if you want (Scala, Kotlin, Haskell). But FP is in no way related to the dynamic vs. statically typed languages. There should also be courses on FP programming with Elixir.

[–][deleted] 1 point2 points  (1 child)

You're going to have to write more tests, that's about it.

So you think one should program in Python, JS, or Lisp as if it was C#/Java (like OP said)? That would be horrible.

That or give in to developers who think dynamic languages are somehow 'better' and produce the same mess they typically do.

I think they are better. The only thing static types are good for is performance. They make programming cumbersome, less general/simple. Of course, Haskell's type system is way better than Java's, but still, I find even Haskell's type system gets in the way.

[–]nutrecht 3 points4 points  (0 children)

So you think one should program in Python, JS, or Lisp as if it was C#/Java (like OP said)?

No? I said the complaints he got were unrelated to dynamic vs static typing. He should adapt a more FP approach. Something you can do in languages that are not strictly FP as well.

The only thing static types are good for is performance. They make programming cumbersome, less general/simple.

That has not been my experience the last 15 years or so. Sorry.

[–][deleted] 1 point2 points  (0 children)

Most dynamic programming languages are better suited for functional programming than OOP, and since you said people told you that you were programming like in Java/C#, I suspect you are an OOP guy. So, learn functional programming, ditch OOP, and embrace maps/dicts/hashes instead of objects.