Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is so sad that i wasted time explaining something while you don't even know that typescript is statically typed language. That's the whole reasoning behind typescript.

It is more powerful because it flexible because it's typesystem is turing complete and you can describe literally anything in it. Everything is strongly typed. It is powerful because you can express anything unlike swift/java/kotlin where you are forced for some subset of what can do in typescript. For example, good luck enforcing string variable to specific values only. Good luck working with two classes that have same fields but don't have common interface with them. It is the fact - you can do much less in this languages than in TS.

Test also is the easiest thing to do in ts: i am coding for 20+ years and jest is simplest solution for tests ever. You just can't compare this to a shitshow of native testing (one is xcode because of xcode, another is android well because it is android).

I don't understand how python or erlang relate to discussion of ts on rn. You advising to write ios apps in erlang?

While you wasn't rational, i still tried to calculate how much i need to install to build anything with plain clang. I got docker with ubuntu 20.20, base image is 78MB. Executed: 'run apt-get update && apt-get install -y clang python3' now image is 700MB. And i still don't have llvm, debuggers and anything i need.

The docker image of golang alpine is 350MB after downloading. Alpine itself is 5MB.

So how small is small?



Typescript is a strongly typed language built on top of one that isn't, just like Objective-C gets all of the run-time problems that C has if you wanted them or not. There is no such thing as a free lunch.

And if you didn't understand my argument about the fact that Typescript only exists and is used because people are forced to deploy to Javascript-only targets and are desperate to use something that is a bit more sane to work with I don't know what else to say. I've used Typescript, it has some great ideas I would love to see in Swift but at the end of the day the only thing it is is an extension of Javascript, which includes all of Javascript's failings.

If you like languages that have the properties of Javascript, there are better languages out there. Nobody would use Javascript if given an equal choice between all alternatives. Javascript is used because you have no other choice if you want to be compatible with browser-only targets.


Yes the very same way Swift exists because iOS devs are forced to use Objective-C (that have exact same flexibility of js) and Kotlin is simply because there are so many java projects and environments.


Untrue.

Typescript uses Javascript as it's runtime so inherits all of it's problems, Objective-C and C are 100% transparent to each other and for real masochists it's even possible to call Objective-C from C with an awful and clunky API. So you'll find most of C's problem in Objective-C while it's a much nicer to use language to express business logic and definitely much more compiler safe. Kotlin uses the same JVM as Java and inherits some of it's limitations (around generics for example).

Swift has it's own run-time and used to ship it with every app built in it before the ABI was stabilized (and is still added for older versions of macOS and iOS if you target them). It still needs to interface libraries written in C and Objective-C and for that reason some parts of the language aren't as clean as I would like to see it, but otherwise UIKit and other libraries wouldn't have been compatible.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: