Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
RyanCavanaugh
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
15 ms
·
121.
▲
by
RyanCavanaugh
9y ago
You could look at the TypeScript compiler itself, which uses zero classes.
122.
▲
by
RyanCavanaugh
9y ago
"without the types your code is perfectly valid JS, which is what actually happens via a simple Babel transform" This is literally exactly the same amount of true for TypeScript as it is for Flow
123.
▲
by
RyanCavanaugh
10y ago
Except for all the times it isn't, which you still have to remember or have enforced by a tool.
124.
▲
by
RyanCavanaugh
10y ago
Its a good question readers of the English language can also infer punctuation where needed it's not considered good style to make readers infer this there can be some oddness if you are not used to putting punctuation where it belongs
125.
▲
by
RyanCavanaugh
10y ago
So what's the goal of this project? From the announcement it says there are lots of new rules in 10.0.0 designed to help catch bugs and make programmer intent more explicit. Then in the FAQ it says Can I use a JavaScript lan
126.
▲
by
RyanCavanaugh
10y ago
Let's say that for a given set of physical laws, you get some "computational power" P, which characterizes how hard it is do to computation using those laws. You could imagine a universe with lower P than ours, where light wa
127.
▲
by
RyanCavanaugh
10y ago
It's not possible to add extension methods to TS in a way that would be usable in practice. https://github.com/Microsoft/TypeScript/issues/9 has a long discussion of the problems with trying to do this.
128.
▲
by
RyanCavanaugh
10y ago
Where do you perceive the C#-ness of TS coming from? TS and Flow are ~90% identical (most programs accepted by one would be accepted by the other) and TS adds only a few purely optional syntactic features (namespace, enum) that are widely f
129.
▲
by
RyanCavanaugh
10y ago
TypeScript and Flow have the same behavior with regard to removing types, and TypeScript and Babel have the same behavior with regard to downleveling ES6+ code to ES5- If you target ES6 with TypeScript and only write ES6-compliant code (plu
130.
▲
by
RyanCavanaugh
10y ago
27 is 3 * 3 * 3 and 24 is (3 - 1) * 3 * (3 + 1) 64 is 4 * 4 * 4 and _60_ is (4 - 1) * 4 * (4 + 1)
131.
▲
by
RyanCavanaugh
10y ago
Two main issues combined to cause the NPM problems: NPM didn't cache 404 responses, so they were much more expensive than normal fetches, and VS Code issued way too many requests which resulted in 404s. Both have been addressed -- NPM
132.
▲
by
RyanCavanaugh
10y ago
> I don't want to use a language that changes my code to something else TypeScript doesn't change your code. If you're writing ES2015 code and targeting ES2015 emit, the output code is always exactly what you put in. T
133.
▲
by
RyanCavanaugh
10y ago
This is the tentative fix, though we'll be looking all-up at ways to reduce the load generated by VS Code from this feature.
134.
▲
by
RyanCavanaugh
10y ago
> Prediction markets have also had some high-profile misfires, however — such as giving the odds of a Brexit ‘stay’ vote as 85% on the day of the referendum I'm continuously annoyed by this. The prediction was 85%, not 100%. I'
135.
▲
by
RyanCavanaugh
10y ago
TypeScript was released October 1, 2012. Flow was released November 18, 2014 Did Flow take 2 years to get implemented? I didn't think the initial release looked like a project that had 2 years of dev time on it.
136.
▲
by
RyanCavanaugh
10y ago
It's important to not conflate static typing with OOP. If you think about static typing only in terms of OOP, of course you're not going to like it - classes are not the right abstraction for many problems. The TypeScript compiler
137.
▲
by
RyanCavanaugh
10y ago
`const` applies to a binding; `readonly` applies to a property. The difference is important because you can alias a mutable property through a readonly reference (thus observing two different values from the same reference if someone with a
138.
▲
by
RyanCavanaugh
10y ago
We've removed nearly all the implicit anys from DefinitelyTyped, so if you're getting definitions from there, you shouldn't see any. We don't have good data on this but my perception from talking to people on GitHub is t
139.
▲
by
RyanCavanaugh
10y ago
It's tempting to think this way, but it's a performance/complexity nightmare. If everything is a plugin, then you need ways for different parsers to talk to each other to deal with nested syntax, plus ways for different syn
140.
▲
by
RyanCavanaugh
10y ago
Speaking as the person who implemented JSX support for TypeScript, I question the premise! JSX support (and implementation of React semantics for typechecking that JSX) was a very popular feature request. I can tell you just from how quickl
141.
▲
by
RyanCavanaugh
10y ago
I would draw the opposite conclusion from that data. The mode difference was 0, and 91% of people were within 1 star of the interviewer. Without knowing what the interviewer's bar is for any particular star level, I don't see how
142.
▲
by
RyanCavanaugh
10y ago
As systems evolve into higher levels of abstraction, things that we used to consider to be "code" become "data" instead. For example, in 1950, you would write a lot of code to accomplish what you can do today with a pivo
143.
▲
by
RyanCavanaugh
10y ago
My experience, having locked a thread exactly once after triaging several thousand reports on TypeScript, is that you immediately get another bug from the same person complaining about how dare you lock an issue.
144.
▲
by
RyanCavanaugh
10y ago
Anecdotally, we added a template to the TypeScript issue form. Our stats (duplicate / not repro / just a question) didn't move at all. Our template had a sample version number in it that the logger was supposed to replace wit
145.
▲
by
RyanCavanaugh
10y ago
The plugin code is here: https://github.com/Microsoft/monaco-typescript
146.
▲
by
RyanCavanaugh
10y ago
Yep, the JS inference engine here is just the TypeScript inference system with a few extra rules bolted on. It's also the JS inference used when compiling JS files in TS under the --allowJs flag.
147.
▲
by
RyanCavanaugh
10y ago
The major and minor version of the types modules corresponds to the version of the underlying package; the patch version will increment when the type definition changes. We're still figuring out what to do with scoped packages in this
148.
▲
by
RyanCavanaugh
10y ago
Who's "they"? typings is a third-party tool not developed by the TypeScript team.
149.
▲
by
RyanCavanaugh
11y ago
It's been fixed for a few months in the Handbook repo ( https://github.com/Microsoft/TypeScript-Handbook/pull/119/fi... ), but the new updated Handbook hasn't been pushed to the website yet.