I Was Wrong About TypeScript
161–170 of 194 posts
Re: I Was Wrong About TypeScript
#162Earlier quoted context omitted.
Tests are weak evidence of the validity of a piece of data at runtime. Types are proof. The stronger your type system, the more you can prove.
But doesn't Typescript compile to JS, thus there's actually no type-checking at runtime? Certainly type checking can prove that it's the right type, but in my experience knowing that it's the right type but the wrong data is useless, I care if it's the exact data it's supposed to be. How does type checking protect you (or someone else) from inadvertently mutating a value without changing it type and causing problems…
Re: I Was Wrong About TypeScript
#163How much memory does the compiler use?
Re: I Was Wrong About TypeScript
#164Earlier quoted context omitted.
If you use --outDir, wouldn't the .js files that import the transpiled .ts files need to point to outDir instead? This is the kind of stuff that makes the "incremental" adoption argument hard for me to swallow. If I can't rewrite a .js file to .ts without any further ripple effects within the project, then it's not truly incremental. I wrestled with this stuff last week and ultimately ended up going with flow since i…
Hey, I work on the TypeScript team. I hope you'll reconsider, and maybe you can fill me in on the issues you ran into. Your .js files should typically be relative to each other, so unless you're using absolute paths (which you usually shouldn't!), this hasn't been a problem for other users. Is there something that I'm missing?
I want the ability to convert any existing js file within the project to ts without having to touch a single other source file. I also want the type checker to assume that if I don't have a type definition for a package, that I don't want the use of that package to be type checked (without being forced to rewrite my ES6 imports to commonjs).
I was able to do this with flow but not typescript.
Is there something I'm missing?
Re: I Was Wrong About TypeScript
#165Earlier quoted context omitted.
I can't go with that. Anders H is one of the most avuncular, helpful and accessible voices out there. Oh and his very verbs twinkle!
Well, I just saw a talk about TypeScript 2 and it felt to me that he was belittling JavaScript.
Re: I Was Wrong About TypeScript
#166Anyone have feedback on using Flow vs TypeScript?
I'm also interested in this question. Here's two things I saw on Jeff Morrison's (Flow author) Twitter: * http://djcordhose.github.io/flow-vs-typescript/2016_hhjs.htm... * https://gist.github.com/jeffmo/ef9214ca3acfe76c54a237b5710d3...
"Flow written in OCaml, Typescript in Typescript"
Re: I Was Wrong About TypeScript
#167Earlier quoted context omitted.
Well, I just saw a talk about TypeScript 2 and it felt to me that he was belittling JavaScript.
You're not your programming language. When people are expressing distaste about a language, it's (usually) not an attack towards its users.
Re: I Was Wrong About TypeScript
#168Earlier quoted context omitted.
Well, I just saw a talk about TypeScript 2 and it felt to me that he was belittling JavaScript.
You may be traumatised if you ever hear Crockford talk about JavaScript!
Basically he said static typing could be good and there were languages like Scala out there with real good type systems, but most of the "pro static types"-fanboys are using crap like Java or C++.
Re: I Was Wrong About TypeScript
#169Earlier quoted context omitted.
Well, I just saw a talk about TypeScript 2 and it felt to me that he was belittling JavaScript.
If you've ever worked with a strongly typed language you can't but belittle JavaScript ;)
Re: I Was Wrong About TypeScript
#170Earlier quoted context omitted.
Ah, yes, that's what I'm doing most of the time. But like you said it's no better than using JS directly, haha.
Actually, it's better. If the core of your application has non trivial business logic, it's a good idea to write it in typed way and write ui and other support stuff with partially typed code.