Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
inbx0
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
61.
▲
by
inbx0
5y ago
1. And biggest for me: Exact types function x(y: { foo: number, bar?: number }) {} const y = { foo: 1, baar: 2, // typo } x(y) The above is caught in Flow when exact types are enab
62.
▲
by
inbx0
5y ago
Note that, in the current form of the JS proposal, you also need to use the placeholder in unary functions. I.e. sanitize(%) and capitalize(%)
63.
▲
by
inbx0
5y ago
Sure, but that's not something you can fix at the ecosystem level, it requires effort from the package maintainers and/or researchers to backport these fixes to older versions. And if the fix requires effort from the maintainers t
64.
▲
by
inbx0
5y ago
> vulnerability drops that impacts you project severely well if it's a regex ddos in build tooling, it doesn't "impact your project severly". That's the entire point of this thread
65.
▲
by
inbx0
5y ago
I've been toying with similar idea, also for JS/TS, but I'm struggling to come up with a search term syntax that'd feel even somewhat intuitive. Maybe "function foo" would match all functions named foo, includi
66.
▲
by
inbx0
5y ago
I kinda want to agree but then, I practically never do hit that button. Not on google search results. Not on hacker news.
67.
▲
by
inbx0
5y ago
The const t = new Translation was indeed a mistake in my example, since we are talking about static properties and not instance properties. But the point still stands, just remove "new" from that example and the same applies, th
68.
▲
by
inbx0
5y ago
There's an observable difference with your getter based approach and the "normal property values" approach in the article: const t = new Translation // property value that // is initialized o
69.
▲
by
inbx0
5y ago
Why'd he kill himself though? Unless
70.
▲
by
inbx0
5y ago
Licence to kill -9
71.
▲
by
inbx0
5y ago
Not really, and correct me if I'm wrong but afaik TS doesn't actually do row polymorphism so much as structural subtyping - although the difference between the two is pretty small and you can get pretty close to row polymorphism w
72.
▲
by
inbx0
5y ago
There's probably some overhead for switching between a C++ implementation and user-defined JS, and the sorter would need to do that a lot since most sort calls come with the compare-callback.
73.
▲
by
inbx0
5y ago
Can we call it the Done Labour Reimbursement token?
74.
▲
by
inbx0
5y ago
I think it's worth noting that it doesn't seem like the author here sees it quite the same way as you do. Burnout is obviously bad, but it also seems to me that he genuinely enjoys writing open source software, so I guess that enj
75.
▲
by
inbx0
5y ago
That will break with > Uncaught TypeError: Cannot convert undefined or null to object because `myObjectArr.at` doesn't bind `this` to `myObjectArr`. When the internals of `map` call the `at` function, `this` is just `undefined` inst
76.
▲
by
inbx0
5y ago
And what percetange of those "static pages with JS sprinkled on top" have a need for automatically generated custom avatars?
77.
▲
by
inbx0
5y ago
> which simply cannot be done with ES6 modules because imports will be captured I'm probably misunderstanding the problem here, but perhaps it's worth noting that ES6 module exports declared with let/var can be changed fro
78.
▲
by
inbx0
5y ago
I've done a little toy language implementation with Nearley and really enjoyed it. If you have some JS experience under your belt, Nearley should be pretty easy to pick up and I felt it was easy to build on top of the basic building bl
79.
▲
by
inbx0
5y ago
From Rome readme: > Rome is designed to replace Babel, ESLint, webpack, Prettier, Jest, and others. Afaik esbuild only intends to be a replacement for 2 out of 5 of those things. It does that well for sure, but if parent commenter's
80.
▲
by
inbx0
5y ago
That's... actually a brilliant idea, in my opinion. Overengineered? Idk, seems like something you'd have to implement once with like 100 lines of glue code for different libraries and then it could just work. And it could seriousl
81.
▲
by
inbx0
5y ago
Even if your target platform didn't have ES6 modules, Babel is probably not the tool you'd want to transpile those with. Let the bundler (which is the topic of the discussion here so I assume a bundler is used) handle them. Tree s
82.
▲
by
inbx0
5y ago
Please do if it's not too much trouble. We have gone back and forth with this idea but never did make the jump. A few random questions off of the top of my head... Did you use a tool like flow-to-ts to help with some of the rewrites? W
83.
▲
by
inbx0
5y ago
> [citation needed] I don't have anything but own anecdotial evidence to provide. Would be cool if there were some good, recent benchmarks between the two, but I wasn't able to find any. Maybe I've just configured somethin
84.
▲
by
inbx0
5y ago
Yes, there's an active albeit small community there. I don't think I'd recommend it over TS for a new project by default, unless the person has some specific pain points with TS that Flow would fix. But Flow does still have s
85.
▲
by
inbx0
5y ago
Given that Chromium dominates the browser market, where does "V8 JavaScript" end and "in-browser JavaScript" begin?
86.
▲
by
inbx0
5y ago
What platform are you targeting that supports private class fields but does not support (in a month or two I guess) the new #foo in obj syntax?
87.
▲
by
inbx0
5y ago
How do you think those two stack up against each other? Not trying to start language wars here, of course, I'm just interested because I find Nim one of those languages that I'd like to try but don't have a project/use c
88.
▲
by
inbx0
5y ago
How come more people don't use ReasonML in place of this? It runs as OCaml on the server, it is a typed language, it's faster than v8 JavaScript. Or F#? Not a fan of the functional? Then maybe Kotlin? Nim? No? There are a ton of g
89.
▲
by
inbx0
6y ago
And then you can't repro the bug anymore because it was related to Mobx observables or whatever and that JSON.stringify suddenly made it work so you just... leave it there...
90.
▲
by
inbx0
6y ago
Well, for one thing, if you copied the numbers from the example as they are defined, then JS will be dealing with simple floating point numbers and actually gets the answer wrong (but gets there fast!). The answer is beyond 5E+17 but JS
More ›