4 ms·
Prove how? By means of natural selection. They could have succeeded in spite of dynamic typing, not because of it. You think the otherwise smart and
by TekMol 9y ago
Prove how?
By means of natural selection.
They could have succeeded in spite of
dynamic typing, not because of it.
You think the otherwise smart and successfull founders of these projects all made the wrong choice when it came to selecting the right tool for the job?
Facebook defined a new programming language
No, they wrote a faster runtime.
to add static typing to HHVM
No, they added type annotations.
There’s a lack of good statically-typed languages
No, in the past statically typed languages were the norm. C, C++, Java...
It's just that dynamic languages outcompeted them.
- minitech 9y ago> You think the otherwise smart and successful founders of these projects all made the wrong choice when it came to selecting the right tool for the job? Not at all! I think dynamic typing hurts code, but there are: - not always alternatives - many other slightly suboptimal choices that it’s quite possible to succeed in spite of > No, they wrote a faster runtime. I’m referring to Hack, which is in fact another language with static typing. (Type annotations are static typing with compromises, and you can see what’s being gone for.) > No, in the past statically typed languages were the norm. C, C++, Java... Those are not remotely good. Some examples closer to being good are Rust, a step in the right direction that’s still unfolding, and Haskell, a wonderful language hampered by a slow compiler and a lack of decent packages. (And probably several less popular languages, but popularity is an important factor…)
- Turing_Machine 9y ago"Those are not remotely good. Some examples closer to being good are Rust, a step in the right direction that’s still unfolding, and Haskell, a wonderful language hampered by a slow compiler and a lack of decent packages. (And probably several less popular languages, but popularity is an important factor…)" Wait: so you are arguing that startups should use languages that are either incomplete (Rust) or that have slow compilers and poor library support (Haskell), or possibly some other "good" language that doesn't actually even exist?
- minitech 9y agoI’m saying that dynamically-typed programming languages are the best choice right now, but that it’s not because they’re dynamically-typed; existing fare for statically-typed languages is just worse. Probably should have clarified that earlier since it looks like I agree with the statement that choosing Python was “a mistake”; sorry. I don’t. Vehemently.
- dragonwriter 9y agoIf type annotations support a static verifier, they implement static typing (which, after all, is just having a static verifier that uses some combination of annotations and inference to validate types.)
- dom0 9y ago> It's just that dynamic languages outcompeted them. All "trending" languages are statically typed (Rust, Go, Swift, Kotlin, ...) and all the popular JavaScrip-improved-languages are statically typed as well. Even further, many dynamically typed languages have pushed in recent years to add type annotations or even static typing (e.g. mypy). Dynamic typing is the brainchild of the 90s for rapid initial development. Sustainability has been a big issue from the outset.
- kazinator 9y agoDynamic typing is from 1958 Lisp. Your history is off a bit there, by some forty years.
- dom0 9y agoLisp has nothing to do (in many ways) with the late 80s and 90s wave of dynamic languages.
- spot 9y agoJavaScript was definitely partly inspired by Scheme.
- zem 9y agolikewise ruby by lisp
- Gaelan 9y agoI’d say Ruby’s closest sibling is Smalltalk personally.
- kazinator 9y agoPeople say this mainly because of the brace-enclosed blocks of code being functions. However, that is really just a syntactic sugar for lambda (and can even have explicit arguments: (lambda (x y) ...) <--> {|x,y| ... }.
- nine_k 9y agoSmart answer successful founders of Wikipedia took an existing wiki engine. Their aspirations were not in the software development area. Highly dynamic languages like Python or PHP or Perl are easy to start with, so they're great for prototypes. Then either a serious rewrite follows, using a statically checked language, or scaffolding is erected to continue to make do with the dynamic code. Microservices help!
- bayesian_horse 9y agoErm, so splitting big Python projects into microservices is proof that dynamic typing is unsustainable?
- nine_k 9y agoNo; but a single microservice is a smaller code base that a large monolith, so the problem . Also, you normally control the microservice's interface more strictly, and change it less often, and care about compatibility and versioning more, than for a typical internal API.
- deleted 9y ago[deleted]
- nv-vn 9y ago>You think the otherwise smart and successfull founders of these projects all made the wrong choice when it came to selecting the right tool for the job? Nobody is perfect. Mark Zuckerberg has had his fair share of controversies for example. >No, in the past statically typed languages were the norm. C, C++, Java... Not good examples for your argument. These are largely considered poorly statically typed. Compare to ML, Haskell, Ada, Rust, Swift for reference.
- TazeTSchnitzel 9y ago> No, they wrote a faster runtime. Which includes a statically-typed version of PHP, namely Hack, that they use for their code. > No, they added type annotations. Hack's type checking is much more sophisticated than mere “annotations”. That label might be better suited to PHP's type system.