3 ms·
Ask HN: Why do dynamic languages dominate server-side web development?
Another way of wording this question is: why are there so few AOT (ahead of time) compiled languages being used for server-side web development?
Perceptions of popular dynamic languages (Python, PHP, Ruby):
- less verbose and less typing than strongly-typed compiled languages
- interactive shell encourages fast prototyping and fast development
- comprehensive internet-related libraries: a huge time-saver. (This isn't an intrinsic feature of these languages, but a huge part of their appeal. Is it the principle reason for their success?)
Perceptions of statically compiled languages (excluding languages that require a Virtual Machine):
- More verbose, more declarations, a feeling of being more constrained (this can be seen as both good or bad)
- Single executable with no external dependencies = simple and (possibly) easy installation compared to dozens or hundreds of tiny script files
- compile-and-run cycle slows down development (But does it really? Compilation speeds for many languages have been blazingly fast stretching back many years. And separate compilation of modules has been around for decades too.)
- low-memory consumption and fast speed of execution (relative to dynamic languages)
Low-memory usage and speed of execution are often dismissed as of lesser importance but they do make a difference. For example, Badoo (a dating/social network site) switched from PHP 5.5 to PHP 7 and saw their server costs shrink dramatically due to lower memory usage [1]. So speed and memory usage matter. But, of course, "developer productivity" matters too. And there's a strong sentiment that dynamic languages make you more productive.
Of compiled AOT languages, only Go seems to be making an impact. But otherwise server-side web development has been thoroughly conquered by dynamic languages. Is that domination a good thing?
[1] https://techblog.badoo.com/blog/2016/03/14/how-badoo-saved-one-million-dollars-switching-to-php7/
- mpweiher 9y agoOne thing that made Ruby possible was that app perf. is highly irrelevant for the vast majority of web apps. First because even the most ridiculous setup can handle most sites (after all, you're only shoving some characters around), and second because the standard DB-centric architecture meant that the DB was the bottleneck. One that made dynamic languages desirable is that their flexibility makes them more amenable to writing architectural adapters, and you really want architectural adapters in web apps.