Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
eyelidlessness
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
31.
▲
by
eyelidlessness
1y ago
Types are a kind of test. Specifically they’re a way to assert certain characteristics about the interactions between different parts of the code. They’re frequently assertions you’d want to make another way, if you didn’t have the benefit
32.
▲
by
eyelidlessness
1y ago
As you move more testing responsibilities to the compiler, it can be valuable to test the compiler’s responsibilities for those invariants though. Otherwise it can be very hard to notice when something previously guaranteed statically cease
33.
▲
by
eyelidlessness
1y ago
I found myself following a similar trajectory, without realizing that’s what I was doing. For a while it felt like I was bypassing the discipline of TDD that I’d previously found really valuable, until I realized that I was getting a lot of
34.
▲
by
eyelidlessness
1y ago
In order: 42 years old; 17 years (at least? starting to lose count!); PHP -> JavaScript -> Clojure/ClojureScript -> TypeScript. Perhaps more pertinent to the topic, in my last job I implemented the bulk of an XForms implementa
35.
▲
by
eyelidlessness
1y ago
I don’t think this is a reinvention of XHTML. It’s definitely closer in spirit to XUL, but seems different enough still that I wouldn’t call it reinvention. What seems particularly novel about this is that it’s taken the compositional appro
36.
▲
by
eyelidlessness
1y ago
I think that’s part of the problem: there’s no canonical idiom. The other part of the problem (IME) is that the biggest gap in nominal typing support is exactly what enum solves: nominal primitives . Yes, you can kinda get there with brand
37.
▲
by
eyelidlessness
1y ago
To be fair, this is a better example of booleans being a poor fit for modeling many problems. And it’s solvable without even addressing either issue (eg how this is modeled in the real world with multiple affirmatives).
38.
▲
by
eyelidlessness
1y ago
I agree completely. But I also know I’m in the extreme minority. Now I just use erasable syntax even on my personal projects because it’s less friction. Maybe someday the enum proposal in TC39 will mix this up a bit!
39.
▲
by
eyelidlessness
1y ago
It uses swc under the hood.
40.
▲
by
eyelidlessness
1y ago
Completely picking nits: Node doesn’t understand types at all, the distinction is between what TypeScript now calls “erasable syntax”[1] versus syntax excluded by that. The exclusion of enum isn’t likely to affect many projects (because enu
41.
▲
by
eyelidlessness
1y ago
I would not presume to define the parameters of friendship for others, as it can vary wildly between people and even between a given person’s friendships. There is certainly an imbalance between dog and human authority/autonomy/ag
42.
▲
by
eyelidlessness
1y ago
It had to be incompatible with CommonJS regardless of top level await. There is no imaginable scenario where browsers would ship a module system with synchronous request and resolution semantics. A module graph can be arbitrarily deep, mean
43.
▲
by
eyelidlessness
1y ago
Thank you for your response! I’ve been loosely following the project already and now my interest is piqued even more. Your explanation and approach makes a lot of sense to me, now I’m curious to see how it plays out!
44.
▲
by
eyelidlessness
1y ago
Disclaimer: I’m way out of my depth on the theoretical front, despite similarly taking interest in ECS in unconventional places. I’m responding from the perspective of most of my career being in JS/TS. I think your instincts about prog
45.
▲
by
eyelidlessness
1y ago
Maybe it’s ugly, that seems like a matter of personal taste. But it’s syntactically unambiguous which is valuable especially for a language which mixes expressions and statements in often very subtle ways. There are also other ambiguities t
46.
▲
by
eyelidlessness
1y ago
It’s very situational. If you can predict the shape of error cases, anything that doesn’t match that shape will do. If you can’t, you can fabricate a nominal type in one way or another (such as the symbol suggestion made by a sibling commen
47.
▲
by
eyelidlessness
1y ago
I think they’re talking about something slightly different, and they allude to it by saying the useful complex types on the happy path become less useful when something goes wrong. What I believe they’re encountering is that type errors—a
48.
▲
by
eyelidlessness
1y ago
You can enforce them (statically) by other means if you’re determined enough, eg by using lint rules which enforce type-like semantics which the type system itself doesn’t express.
49.
▲
by
eyelidlessness
1y ago
For what it’s worth, this is also true of whatever else one might express with JSX: imperative code (and syntax, and semantics) can be structured in a way that closely resembles declarative code… with discipline . It’s doesn’t have to be e
50.
▲
by
eyelidlessness
1y ago
A (the?) major area where this is generally considered unanswered, and active in PL research, is “effects” (as in, side-effects).
51.
▲
by
eyelidlessness
1y ago
Minor nit, because this is one of my weird special interests: this (being render-agnostic) isn’t necessarily a property of React’s virtual DOM . It’s a property of JSX being explicitly specified without semantics. For instance, Solid also
52.
▲
by
eyelidlessness
1y ago
I thought the same thing. It’s usually content that’s well outside my areas of familiarity, often even outside my areas of interest. But I usually find his writing interesting enough to read through anyway, and clear enough that I can usu
53.
▲
by
eyelidlessness
1y ago
Being liberal in what you accept, also known as the “robustness principle”, doesn’t mean being ambiguous or surprising about how you accept it. If anything, robustness requires a great deal more precision and clarity (at least with your o
54.
▲
by
eyelidlessness
1y ago
The thing that makes libraries like Zod trustworthy is that they: - parse as their validation mechanism - compose small units (close to the type system’s own semantics for their runtime equivalents, trivially verifiable), with general compo
55.
▲
by
eyelidlessness
1y ago
I’ve had no problem rendering far more complex graphics than a pie chart, with SVG, without sending a single byte of JS to clients (not just the SVGs, a variety of fairly interactive content!). I realize that’s fairly niche, and it’s a bit
56.
▲
by
eyelidlessness
1y ago
SVG complexity is a good counterpoint to “why this instead of SVG”. But I don’t think we need to even address the claim that most tools for SVG generation use JS, if the concern is JS on the client . Realistically, on a scale beyond very f
57.
▲
by
eyelidlessness
1y ago
SVG doesn’t require JS.
58.
▲
by
eyelidlessness
1y ago
My mistake! That’s what I get for not double checking… well… basically anything I think during my first cup of coffee.
59.
▲
by
eyelidlessness
1y ago
How is it implicit? The open parenthesis is before the function name rather than after, but the function isn’t called without both parentheses. If you want to use commas, you can in Lisp dialects I’m familiar with—they’re optional because t
60.
▲
by
eyelidlessness
2y ago
I clicked to satisfy the earnest request for attention. I even read some of the blog once I got there!
More ›