6 ms·
I love Ruby, Python and JavaScript. I believe I am more productive with dynamic languages than say static languages like C# or Java. The abstractions in dynamic
by rdudekul 11y ago
I love Ruby, Python and JavaScript. I believe I am more productive with dynamic languages than say static languages like C# or Java. The abstractions in dynamic languages (at least for me) allow me to write less code with less confusion and less classes to remember.
With so many libraries supporting my development, I usually tend to write much less code using a dynamic language. Also most of the code tends to be isolated with clear interfaces exposed to other parts of the code. Writing tests is simpler too, compared to writing them in dynamic languages.
May be large projects with hundreds of thousands of lines of code, could benefit from statically typed languages. But for majority of the projects (80-20 rule) dynamic languages offer cleaner syntax, simpler coding experience and faster time to market (my opinion).
- tormeh 11y agoDude, you're comparing specific languages you're naming, rather than comparing dynamic and static.
- jack9 11y agoHe grouped them by dynamic ones (the scripting languages) and the statically typed ones.
- wtetzner 11y agoBut the two typed languages are ones that have poor type systems. I'm more productive in OCaml than I am in Ruby or C#.
- Avshalom 11y agoArguments in favor were: less confusion, less classes, more libraries, cleaner interfaces and easier testing. Of those classes and libraries obviously apply per language not per typing discipline, confusion was rhetorically tied to the number of classes so again, thats about the language not the typing. tormeh's right, the comparison was between languages, not between typing.
- stephen 11y ago> dynamic languages offer cleaner syntax Solely for syntax, my assertion is that this is just because dynamic languages evolve faster. Because they are easier to build. E.g. one person can buy the dragon book(s), use parser/lexer libraries, get an AST, and then start an interpreter than just stores objects as maps, and evals things dynamically. But very few people are going to write a new/novel type system on their weekends. So that's why, IMO, all the sexy/modern syntax shows up in dynamic languages first, and then takes ~a generation or two to reach static languages, where you need a dedicated team to put the effort into the type system + compiler + expected tool set (IDEs/etc.). (E.g. see Scala, Kotlin, Rust, etc., which have all, IMO, achieved the "syntax as nice as Ruby" level, but took large teams of people to do it).
- marcosdumay 11y ago> But very few people are going to write a new/novel type system on their weekends. No, but one can hack an extension to the GHC type system in a weekend. (That's one of the reasons why there are so many.)
- Veedrac 11y ago> see Scala, Kotlin, Rust, etc., which have all, IMO, achieved the "syntax as nice as Ruby" level I've only reasonable experience with Rust in that list but... no. I've seen enough Scala to get that that's not true, and I know it's not true for Rust. That's not to say that static languages can't have nice syntax - Crystal is a great example if you'r trying to match Ruby - but I don't think your examples are great.
- yogthos 11y agoI simply question writing projects using a monolithic style in the first place. Anytime somebody brings this up as an advantage of static typing I get a little suspicious. In fact, it could be argued that static typing gives the user enough rope to hang themselves with. With dynamic typing you're much more likely to break things up early precisely because you know you have to keep things in your head. On the other hand, static typing allows you to just keep adding code and it makes sure that the code will compile and run. However, at some point you end up with a large and complex system that you don't really understand. All you know is that it's self consistent. Understanding what the business logic is doing and why can be quite difficult and the fact that it type checks does little to help you there. Coincidentally this is the reason that static typing proponents are obsessed with refactoring. Once you realize what mess you got yourself in then you have a ton of code to refactor and there's no way you can keep track of it all in your head. With a dynamic languages refactoring tends to happen in much shorter cycles and introduces much less cognitive load.
- incepted 11y ago> With dynamic typing you're much more likely to break things up early precisely because you know you have to keep things in your head. If you are programming with a language that forces to keep everything in your head, you'll never build big systems.
- sitkack 11y agoThe kind of code you could only write while on holiday in Cambodia.
- yogthos 11y agoYou mean you'll never build a monolith. In practice, I've been working on big systems in Clojure for the past 5 years. They just happen to be broken down into manageable components you can work on and reason about in isolation.
- incepted 11y ago"I" makes me think you've only ever worked solo on Clojure projects, is that correct?