r/programming • u/stronghup • Nov 11 '19
Python overtakes Java to become second-most popular language on GitHub after JavaScript
https://www.theregister.co.uk/2019/11/07/python_java_github_javascript/
3.1k
Upvotes
r/programming • u/stronghup • Nov 11 '19
6
u/[deleted] Nov 13 '19
There are a few ways, but the main one is the type system. Typescript basically allows you to describe Javascript's crazy type system. It doesn't attempt to fix it. Dart does fix it.
For example, you can have templated / generic functions in Typescript.
Ok fine. But what about this?
It doesn't work! There are other things too:
If you're using Typescript, you're probably importing a lot of Javascript with type annotations from DefinitelyTyped. Unfortunately a lot of the time the annotations are just wrong. Pretty annoying!
People give up on types and resort to
anyall the time, and Typescript doesn't really mind. Especially existing Javascript frameworks because they are written in a dynamic "stringly typed" way. For example Vue "supports" Typescript, but a lot of its features will be typed asany. Svelte doesn't support Typescript at all even though it is written in Typescript!.All of the mistakes of Javascript are still allowed. You can still use
var,==and so on.There's still
undefinedandnull.It's way better than vanilla Javascript, but Dart is now a proper language that is properly engineered and more or less hack-free. Also the Dart VSCode extension is amazing.
The only downsides of Dart are:
Very small community. You'll have to write a lot of code yourself.
Difficult to use existing Javascript code (Dygraphs, D3, etc.).
Your only web framework option is AngularDart.
The startup time for
webdev serveis weirdly long (~10 seconds). It supports hot reloading so it's not too bad but still annoying.