8
colaguy
18d

I find dynamically typed language a lot easier to read and understand than statically typed language.

What's up with all these interfaces, types and abstractions, its just too much!

I do want structure when writing code, but also the flexibility to test things without the f*** interface/type errors!!!

Comments
  • 11
    In dynamically typed languages it's also much easier to introduce a bug.
  • 7
    Static types and interfaces are there for protection and creating standards.

    If you're working with others on a project, coming up with standards is a good thing (whether that means using static types and interfaces or not).

    Otherwise, play at your own risk. I do, and I also like dynamic languages that give me freedom. But I know what I'm getting into.
  • 2
    And in the middle, there is typescript. You can have typings but you can also just say “fuck off” to typings at some point.
  • 0
    @NotFound TypeScript ftw! I'm using it with Angular and love it.
  • 2
    @NeedsMoreDivs Great way to describe it. Btw your username can't be accurate enough ;)
  • 3
    Sure, it can be cumbersome to get that shit to compile, but it's also a little help to make fewer bugs...
    And today I watched this talk: https://media.ccc.de/v/... - made me doubt that a dynamically typed language can ever be safely implemented.
  • 2
    @phorkyas It depends: Sandboxed dynamic types languages (e.g. JavaScript in web browsers)? Probably not.
  • 2
    @sbiewald ah, yes. Guy in the talk could only show exploit on Linux, because otherwise couldn't escape the sandbox.
  • 4
    Languages with strong type systems allow you to sleep better at night and actually program with confidence because it empowers the compiler to find errors of all kinds and enforce rules. I would much much prefer if the errors happened at compile time, runtime can be much worse and can do bad things to, say, your database and be a PITA to debug.

    Dynamic types languages are much better for a quick script, I agree though, but I usually end up rewriting more persistent stuff in a language with a strong static type system.
  • 4
    With all due respect, but when you're ranting about language types under the devRant tag.. maybe those statically typed languages are a necessary evil after all?
  • 1
    You don't hate static typing, you hate verbosity. Check out Kotlin for a not verbose static typed language.
  • 1
    @Condor haha, I see what you did :) Not sure how the hell devRant tag ended up there...
  • 0
    @deadlyRants No its not. Just because you use types does not mean its less bugs, research has busted this myth.
  • 1
    @colaguy
    "The researchers tested Flow, Facebook’s static type system, and TypeScript – from Microsoft, of course – and found that, at a conservative estimate, each product can spot approximately 15% of bugs which would otherwise have ended up in committed code."

    Doesn't sound like a myth to me. And from my own experience I can tell you I prefer a compiler error with a meaningful error message instead of looking for bugs causing strange behaviour.
  • 0
    @deadlyRants One thing for sure is that it is really difficult to compare which one is better between static and dynamic typed languages because of the factors involved depend on the project, experience and collaboration strategies.

    Here is a research with 49 subjects that concludes static typed languages does not mean less bugs, better quality and faster productivity.

    https://courses.cs.washington.edu/c...

    I have experience in both paradigms, and you can't say which one is better because each supports the nature you program on.

    So by saying that static typed means less bugs, is not a valid statement. Its weakly typed, and biased 🤣
  • 3
    @colaguy Im experienced in both paradigms (js/python/java/typescript) and for me it definitely reduced the amount of runtime errors. Do people really enjoy having to look into docs/source to see what arguments a function expect or what methods an object has? With a typed language I can work on a new project and get around pretty fast just by pressing ctrl space and seeing the types.
    Also refactoring is on a whole other level.

    Also: yeah maybe easier to read but harder to code because of the reasons above imo
Your Job Suck?
Get a Better Job
Add Comment