Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
bcherny
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
25 ms
·
331.
▲
by
bcherny
7y ago
OP answers this in the article: > Isomorphic rendering is a huge simplicity booster for developers, who for too long have been forced to maintain split templates and logic for both client- and server-side rendering contexts. It also enab
332.
▲
by
bcherny
7y ago
This is really well written, the illustrations help visualize the content, and the content itself is largely novel. Really nicely done. Thanks for taking the time to write this — I enjoyed reading it!
333.
▲
by
bcherny
7y ago
What a fun idea — I just signed up. Thanks for thinking about how to better explain things, Dan. The more complicated JS gets the more important good explanations are.
334.
▲
by
bcherny
7y ago
Ted Chiang’s new collection of short stories, Exhalation, has a story called The Lifecycle of Software Objects with a compelling take on this. I really enjoyed it.
335.
▲
by
bcherny
7y ago
This is a cool idea! One thing that sticks out to me is once you get past the overview of what a job entails, you'll probably have a lot of specific questions where Q&A or mentorship with someone that's done the job might be a
336.
▲
by
bcherny
7y ago
It’s not that bad, to be honest. Maybe a few more keystrokes than Haskell, but so is everything else in a C-style language. Definitely a fair point that it is a few more keystrokes, though.
337.
▲
by
bcherny
7y ago
If your code is fully typed, you don't need the default, since you know at compile time that you've handled your cases (Playground link: [0]): type Props = | { type: 'a', a: number } | { type: 'b&#
338.
▲
by
bcherny
7y ago
TypeScript does support tagged unions, actually: https://www.typescriptlang.org/docs/handbook/advanced-types.... As does Flow: https://flow.org/blog/2015/07/03/Disjoint-Unions&#
339.
▲
by
bcherny
7y ago
You can use an `in` check for this, since TypeScript version 2.7 [0]. Here's an example (Playground link: [1]): import * as React from 'react' type Props = | {a: number} | {b: string} function My
340.
▲
by
bcherny
7y ago
The number of possible states exploding is indeed a problem with frameworks like React. One mental model that helps reduce this load, that you alluded to, is avoiding product types where possible in favor of sum types. Eg. Imaging you have
341.
▲
by
bcherny
7y ago
I really love Scala, but I worry about its future given Google putting its weight behind Kotlin, and the two offering a lot of the same features and philosophy. Does anyone know if the Scala maintainers have addressed this directly?
342.
▲
by
bcherny
7y ago
Fun read. I’ve never heard the term “crypto Jews” before — I’ve just used the special case “Marranos”. https://en.m.wikipedia.org/wiki/Marrano
343.
▲
by
bcherny
7y ago
Right, but there will be an error where you consume myIntValue: const myIntValue = f() // Error TS2365: Operator '+' cannot be applied to types 'Promise<number>' and '2' const myResul
344.
▲
by
bcherny
7y ago
> I wish there was a language that let you move gradually from one end to the other, exactly when you need to. This is precisely what gradually typed languages — like TypeScript, Flow, and typed Pythons — solve! I talked about this on So
345.
▲
by
bcherny
7y ago
Previously posted 4 months ago and 1 year ago: https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...
346.
▲
Programming TypeScript: Making Your JavaScript Applications Scale
(amazon.com)
5 points
by
bcherny
7y ago
|
0 comments
347.
▲
by
bcherny
7y ago
Small, but really important clarification: Facebook and Google do not “sell personal information”. They sell advertising. There are lots of companies (called data brokers) that actually sell personal information to advertisers. Facebook, Ap
348.
▲
by
bcherny
7y ago
I’m a fan of Algorithm Design Manual. It’s also what Google and FB recommend for interview prep. https://smile.amazon.com/Algorithm-Design-Manual-Steven-Skie...
349.
▲
by
bcherny
7y ago
Where do I find out more about the “operations” layer that lies between strategies and tactics? This isn’t something I’ve seen in modern (non-military) strategic planning.
350.
▲
by
bcherny
7y ago
It was answered in a comment in that thread. Python+Pandas+Keras. I’d also love source code + data for this; without it, it’s a claim with nothing to back it, yet.
351.
▲
by
bcherny
7y ago
Like any big, multi city real estate broker, the benefit of scale is diversification over local real estate markets, and less risk. A single WeWork in one city is risky due to fluctuations in real estate, economics, labor supply, competitio
352.
▲
by
bcherny
7y ago
I think the goal of renaming is to make it easier for people to understand. So when you post/comment in a group, you know exactly who will see it. Not sure why Group Quality was included in this PR.
353.
▲
by
bcherny
7y ago
What kind of additional support do you wish TS had, that it doesn’t have already?
354.
▲
by
bcherny
7y ago
If you compile your code with TypeScript and set allowJs=true, you’ll get a lot of checking for free with no changes at all to your existing JS code. TS will catch things like dead code, missing return statements, type mismatches and so on
355.
▲
by
bcherny
7y ago
Fun idea, but consider seeding a few example Issues?
356.
▲
by
bcherny
7y ago
Yup, that’s the one.
357.
▲
by
bcherny
7y ago
I just listened to Michael’s episode on Future of Coding — highly recommended for context!
358.
▲
Programming TypeScript (2019)
(programmingtypescriptbook.com)
2 points
by
bcherny
7y ago
|
0 comments
359.
▲
Programming TypeScript (2019)
(programmingtypescriptbook.com)
2 points
by
bcherny
7y ago
|
0 comments
360.
▲
by
bcherny
7y ago
Thanks for the reply! > but it won't resemble what most people in computing expect from a browser or photo editor. In the sense that an end user would interact with some low level API primitives, rather than a full GUI? I’d love mor
More ›