type FireNuke = boolean;
type DontFireNuke = boolean;
function perhapsFireNuke(action: FireNuke);
you wouldn't want to call perhapsFireNuke with DontFireNuke, even though the types are compatible333 karma · joined August 23, 2020
type FireNuke = boolean;
type DontFireNuke = boolean;
function perhapsFireNuke(action: FireNuke);
you wouldn't want to call perhapsFireNuke with DontFireNuke, even though the types are compatibleThat said, I come from a background where the language doesn't let you consider that the type of a value might be wrong (Haskell, for example), so perhaps I have more trust than typescript deserves.
Seems crazy to me to have this attitude, the whole point of typescript (and indeed many other languages with type checkers) is that we can leave out unecessary checks if proven by the compiler. The burden of compatibility is on the caller to ensure they supply correct values
Perhaps, or just no sliders (or something else). To illustrate, setting all the sliders to the min gets the correct order of magnitude, setting all the sliders to the middle gets the correct answer, and max is only off by 1 order.
Maybe the slider just picking the order of magnitude would make it more fun (1e-9 to 1e9 for example, 20 ish steps), not sure. Perhaps the rough range of magnitudes could be a hint provided if the user has no idea?
1. Why are factors reorderable? axb = bxa
2. Why are factors pickable? Is it coincidence that all of todays choices are useful (or did I mess it up)
3. The ranges/sliders ruin it for me IMO, they pick the order of magnitude for you
> This new interpreter type is an internal implementation detail of the CPython interpreter. It doesn’t change the visible behavior of Python programs at all. It can improve their performance, but doesn’t change anything else.
What stops malicious JavaScript that would have used moveBefore() to just add key event listeners?
For example, if I'm feeling stressed/anxious, I'll scroll/browse/distract myself to avoid the negative feelings. I'm not seeking them like doom scrolling says.
Source?
This is odd to me. There are solutions to make data types extensible in haskell, but for example in purescript you'd just use a record. But more importantly, why would you want existing functions to use the new type? Why not just pass the _logger from FileLogger in? The existing functions can't use the _flush ability anyway (in both OOP and FP cases)
const r1: { a: number; b: number } = { a: 10, b: 20 };
const r2: { a: number } = r1;
const r3: { a: number; b: string } = { b: "hello", ...r2 };
console.log(r3.b) // typescript thinks it's a string, but actually it's a number