3 ms·
> running at a profit and getting to market quickly which dynamic languages do extremely well This (or similar variants of this) is an assertion that's commonl
by winter_blue 3y ago
> running at a profit and getting to market quickly which dynamic languages do extremely well
This (or similar variants of this) is an assertion that's commonly made about dynamically-typed languages, but I don't think they hold any water.
Less readable code (due to the lack of types) makes it a lot harder to add new features, and harder to debug code as well.
Several years ago, I briefly worked on a fairly large codebase at a startup that was written in a Ruby on the backend, and CoffeeScript on the front-end. There were only around 60,000 active users. Yet, the dynamic typing made adding new features, or fixing a bug a truly painful and fragile experience. Needlessly painful, and slow. It literally reduced developer velocity.
I think once you cross a few hundred lines, dynamic typing becomes a handicap rather than an advantage.
All of this doesn't even touch on the energy use. Which I'll admit is irrelevant to most companies. Server costs even for popular web/SaaS/etc tech companies are often a tiny tiny fraction of overall cost, with most of the company's annual operating cost being employee salaries. (As I had stated earlier, I don't mind a language being slower - if it actually provided any advantages–like improved developer productivity, in exchange for that slowness.)
- DoesntMatter22 3y agoThe main argument here was about the energy costs. But it sounds as though you don't like dynamically typed languages. That's fine. Facebook, twitter and plenty of of billion dollar businesses were built with dynamic languages and many would argue they may not have even existed if they were written in staticly typed languages due to the slower up front time expenditure. I like staticly types languages for large projects but enjoy thr development speed of dynamic ones. If you don't like dynamic that's completely fine
- winter_blue 3y ago> they may not have even existed if they were written in staticly typed languages This is pure speculation. There's no way you can back this up with any sort of real data. The inverse isn't true either. StackOverflow was written in C#, and it's been doing perfectly well. I've addressed another commentor making a similar presumption as you, here: https://news.ycombinator.com/item?id=37312297 https://news.ycombinator.com/item?id=37312297 The only thing I'll concede is that using a statically-typed language without a good type inference system, might slow people down a tiny bit. The serious downsides of dynamic typing means you might still win out (in terms of developer productivity, code readability, code reliability, and ease of debugging) even if you use a language like Java instead of PHP.
- DoesntMatter22 3y agoStack overflow is miniscule compared to Twitter or Facebook. You can just book at Basecamp if you want to pick a smaller company. They are Ruby on Rails and they have been consistently doing well. Ultimately billion dollar companies have been built on dynamic languages. There is nothing stopping you from succeeding with dynamic languages. There just isn't. There are tradeoffs and these companies made them.
- winter_blue 3y agoI agree that there isn't much necessarily stopping a person succeeding due to the choice of language (unless it's some esoteric or otherwise unrealistic language). Yahoo used C++ for instance (it would not be my choice, even though it's weakly statically-typed). But, yea, like you said--there are tradeoffs. I think dynamically-typed languages has the allure of letting you build quickly initially, but the downsides of dynamic typing start hitting pretty soon afterwrd. I write a lot of small scripts in Python. It certainly is easier to throw something quickly together, especially when the data model is amorphous, with dynamic typing. But that doesn't mean I'd use Python for a large project.