News for hackers. Stuff that matters.
Re:Lyra: Fast, in-memory, typo-tolerant, full-text search en... by micheleriva on Monday August 01, 2022 @03:31AM (#32303139)
Disclaimer: Lyra author here!

The biggest problem I have with TypeScript is to know WHAT .ts files will be compiled into. I.e., if you're using enums or decorators, there's no plain support for them in JS so you'll end up having some kind of "polyfills", which are not so optimized.

Once you analyze your compiled JS, you can write TS knowing what you're gonna get, which is the trick to make it optimized.

My two cents :)

Re:Lyra: Fast, in-memory, typo-tolerant, full-text search en... by nicoburns on Monday August 01, 2022 @04:26AM (#32303406)
The trick there is to not use enums or decorators! In all seriousness, I believe it’s common for typescript codebases to eschew these features, precisely because it’s hard to reason about the generated code (and preferable to avoid features that aren’t on an ECMAScript standards track.
Re:Lyra: Fast, in-memory, typo-tolerant, full-text search en... by Aeolun on Monday August 01, 2022 @07:39AM (#32304603)
Enums compile down to pretty standard objects right? Is there a situation in which you found them to do something odd?

Decorators, yeah, I can imagine that’d end up interesting.