Earlier quoted context omitted.
> Generally yeah, web projects will still want some processing, probably. There's probably a couple KB of code we could shave off, post-compression, and we (very arguably) should. Even industrial scale web development still needs debug builds during development and the fastest debug build is "no build". Faster development builds lead to increased developer productivity if nothing else. Also, don't underestimate the f…
I actually am on the no-uglification bandwagon with you! With compression, I think there's more harm & pain caused by obscuring the source-code to users than there is gain in the very small reduction in size. But this stance gets quite a reaction, from what I've seen, and I wanted to give a lot more rope to the person I was replying to, rather than try to argue this (fairly nor popular) point too. Which is to say, I…
Goodbye TypeScript, hello native typing for JavaScript
11–20 of 31 posts
Re: Goodbye TypeScript, hello native typing for JavaScript
#12Ah well, Javascript was a nice simple language for a while, but I guess it was inevitable that enterprise would ruin it.
Re: Goodbye TypeScript, hello native typing for JavaScript
#13I say this as a huge proponent of TypeScript and static types in general: I'm fairly bearish on this proposal 1) TypeScript supports a huge set of syntax for describing types, and I would be surprised if the standard ever supports all or even most of that, which would mean you can't skip the build step for most real-world TS projects 2) Most front-end projects will continue to have a build step anyway because of thin…
Don't make a type system work around the really bad parts of JS. Instead, don't allow them in typed modules. Don't settle for an intentionally unsound (aka broken ) type system. Add an actually sound (probably hindley-milner based) type system that provides usable type info to the JIT so we can guarantee fast, safe code.
Re: Goodbye TypeScript, hello native typing for JavaScript
#14I say this as a huge proponent of TypeScript and static types in general: I'm fairly bearish on this proposal 1) TypeScript supports a huge set of syntax for describing types, and I would be surprised if the standard ever supports all or even most of that, which would mean you can't skip the build step for most real-world TS projects 2) Most front-end projects will continue to have a build step anyway because of thin…
I'd also add that Typescript would be a very bad language choice anyway. If we're going to have a backward-incompatible change, we should do things the right way (after all, we're stuck with it forever). Don't make a type system work around the really bad parts of JS. Instead, don't allow them in typed modules. Don't settle for an intentionally unsound (aka broken ) type system. Add an actually sound (probably hindle…
It makes much more sense to use a good language (Kotlin, Rust, Java) and transpile to JavaScript. There's already great tooling for it.
Re: Goodbye TypeScript, hello native typing for JavaScript
#15Earlier quoted context omitted.
Regarding point 2. Also, there's no way to run a build/compile step for running 'javascript' to catch these type errors before runtime. Would we bring Node into the CI just to catch those errors? So you may be right, it seems typescript will still be around for enterprise at least.
> there's no way to run a build/compile step for running 'javascript' to catch these type errors before runtime I don't think I follow what you mean here, can you clarify?
In a world where JS has type notation, we'd need a similar command that could analyze the code without running it.
Re: Goodbye TypeScript, hello native typing for JavaScript
#16Earlier quoted context omitted.
> there's no way to run a build/compile step for running 'javascript' to catch these type errors before runtime I don't think I follow what you mean here, can you clarify?
Currently we run "tsc" to "compile" the code and tell us about type errors. "This method passes as string to something that expects a number" etc. In a world where JS has type notation, we'd need a similar command that could analyze the code without running it.
Re: Goodbye TypeScript, hello native typing for JavaScript
#17Or, better still, someone could just write a book on how to wean yourself away from TS.
Re: Goodbye TypeScript, hello native typing for JavaScript
#18So they're really going to add the syntax that looks like, but isn't actually, type annotations for the convenience of people using a third party tool, which is useless in the language itself. It isn't native typing for javascript, which would be nice, but will never happen. Ah well, Javascript was a nice simple language for a while, but I guess it was inevitable that enterprise would ruin it.
What happened in the last decade is that JS from a toy language was promoted to an enterprise grade language and is now used to deliver huge software projects. IMHO on such projects strong typing is a must have requirement, this explains huge popularity of Typescript in recent years. The problem with TS is that they went a little bit overboard with typing: you can have strange constructions like union types and crazy generic type defs - all to provide backward compat with untyped code, that could call func with e.g. string, object and array for the same function parameter. If we add strong typing to JS that _is enforced by the runtime_ we may skip this compatibility ballast and have something more simple.
Re: Goodbye TypeScript, hello native typing for JavaScript
#19Re: Goodbye TypeScript, hello native typing for JavaScript
#20It's also the only language that has a superset language owned by a large corporation with direct influence on standards revolving the ecosystem within which the language is used.
A large corporation that has a history of trying to overtake open communities for monetary or altruistic gain.
And a company that seems not to care about the community's needs or wants and instead manages the priorities of the "OSS" project entirely itself.