2 ms·
It's a trade off, I think. A compiled static language forces you to behave a certain way at the expense of flexibility/expressiveness, script languages are more
by DoctorDabadedoo 5y ago
It's a trade off, I think. A compiled static language forces you to behave a certain way at the expense of flexibility/expressiveness, script languages are more flexible, but in a way that is easier to acquire technical debt that might be harder to move away from (IMO).
- agumonkey 5y agoI'm sure with time, the dynlang prototype phase -> static in production will be the norm. Gradual typing has been improving (might not be the only way but still)
- dbrueck 5y agoYes, the problem with strong static typing in many languages is that you have to make decisions about typing at exactly the worst time (at the beginning), while you almost never know up front exactly what you need. For me the ideal would be a language with the expressiveness and fast dev times of Python, and then type information would be collected from actually running the program during development and would gradually shift from auto-generated type hints to more concrete type declarations that could be enforced but that would also assist in compilation & optimization.
- agumonkey 5y agoI've read people saying they do that in 70s 80s 90s.. it's probably an unavoidable phenomenon of solution space exploration. Even car makers use gradually more precise models before selling something. The type gathering from use would be nice.
- cies 5y agoI find that, with a good IDE, the expressiveness of some typed langs matches that of dyn typed langs. You write a bit more code (the types) when using a typed lang, but you write a bit less tests (the stand-in for types dyn langs offer) and your IDE takes care of many of your type signatures. The fast dev times, as in quick "edit -> run -> try" loops, it what I find most attractive of the dyn langs nowadays. And gradual typing might be a way to get there, although I think it is not needed (some strong typed langs have decent hot code reload).
- Hendrikto 5y agoPeople do not seems to have any trouble producing unreadable and unmaintainable code in statically-typed compiled languages.
- DoctorDabadedoo 5y agoNot at all, but having been on the "dynamically typed spaghetti code with very obscure paths/interactions and no test coverage" refactor wagon, I would take a statically typed option any day.
- cies 5y agoIndeed the quality to look for is strong typed, not statically typed. Strong typed code is much easier to refactor.
- renox 5y agoUnfortunately this requires some 'buy in' from the managers which means that many programs are integer/string typed instead of being strongly typed..