News for hackers. Stuff that matters.
Re:Migrate Jest to TypeScript by peteretep on Wednesday January 16, 2019 @02:16AM (#18918875)
> I guess those who are from Java/C# background would like TS

Been using dynamic languages almost entirely for the last 20 years. I love TypeScript. Starting to wish the other languages I worked with had optional types.

Re:Migrate Jest to TypeScript by scrollaway on Wednesday January 16, 2019 @02:48AM (#18919020)
Good optional types that is. Python, my love of the last 15 years, is finally adopting optional typing but it's an atrociously bad system compared to typescript, to the point that I am seriously wondering if the language will ever have a decent typing system.

Having to import basic types, use awkward syntax, etc... Blergh. I really hope we can be more pragmatic and learn from typescript.

Re:Migrate Jest to TypeScript by speedplane on Wednesday January 16, 2019 @02:52AM (#18919033)
> Python ... I am seriously wondering if the language will ever have a decent typing system.

Considering that everyone seems to use six to target both Python 2 and 3, I am seriously wondering if the language will ever advance at all.

Re:Migrate Jest to TypeScript by basil-rash on Wednesday January 16, 2019 @12:01PM (#18922499)
I don't think we'll get a Python 4 in the foreseeable future ([1] goes into more detail, from a core CPython developer's perspective). But that doesn't mean it can't advance, just that everything will be forwards compatible. Think C and C++, or even ECMAScript, for that matter.

[1]: https://opensource.com/life/14/9/why-python-4-wont-be-python...

Re:Migrate Jest to TypeScript by patates on Wednesday January 16, 2019 @04:55AM (#18919524)
Maybe the trick is being pragmatic all the way down and having a TS-like language (with Pythonic syntax) that's compiled to Python.
Re:Migrate Jest to TypeScript by dragonwriter on Wednesday January 16, 2019 @08:15AM (#18920525)
> Maybe the trick is being pragmatic all the way down and having a TS-like language (with Pythonic syntax) that's compiled to Python.

Mypy started out life as a separate language with pythonic but not Python-compatible syntax and multiple backends that was plannining to take advantage of static typing information and avoiding a GIL to be more performant than Python when compiled to native code rather than using the Python backend.

It later developed a Python-compatible syntax, before becoming a static typing front-end for Python.

Outside of JS land (and that only because of the browser being an environment where the only universally available thing is JS, though WebAssembly maturing may radically change this), there's not really a lot of demand for a separate language that fixes perceived warts in a target language but otherwise hews very close to the target and compiles to that target. Languages that aim to improve another languages ecosystem usually target the same VM instead of being transpiled, and usually offer different style syntax (e.g., Elixir for Erlang.)