News for hackers. Stuff that matters.
Re:Show HN: Postgres.js – Fastest Full-Featured PostgreSQL C... by domlebo70 on Friday March 25, 2022 @04:39AM (#30799806)
Hey.

Love this lib. I am curious why you decided against using TS here? You mentioned it's not your cup of tea.

Re:Show HN: Postgres.js – Fastest Full-Featured PostgreSQL C... by lukaszkups on Friday March 25, 2022 @07:39AM (#30800878)
I can only assume that I've finally found a soulmate that just don't like writing TS code.

Like, in my full-time job I'm using 100% TypeScript, but I don't really ENJOY writing in it - that's why in my all side-projects I use good old JavaScript.

I think it's just a personal syntax preference.

But I don't want to answer this for the OP, just added my 2cents, maybe he has similar feeling about it :)

Re:Show HN: Postgres.js – Fastest Full-Featured PostgreSQL C... by porsager on Friday March 25, 2022 @09:12AM (#30801712)
Haha.. There's plenty of us out there, it's probably just that we'd rather do actual stuff than talk about doing it. A bit like Typescript - it doesn't really do anything, it just talks about it.

Joking aside, I generally don't want to get into the debate, because I believe people work differently, and there should be room for doing both things. It's just a bit sad that Typescript is being pushed so hard as if it's the only right way.

Re:Show HN: Postgres.js – Fastest Full-Featured PostgreSQL C... by jamil7 on Friday March 25, 2022 @09:42AM (#30802054)
> It's just a bit sad that Typescript is being pushed so hard as if it's the only right way.

It's being evangelised as if it has zero downsides, it introduces overhead to what can already be a brittle dependency/build chain - providing questionable levels of actual type safety. This is coming from someone who generally prefers typed languages too, Typescript to me is the exception to that rule.

Re:Show HN: Postgres.js – Fastest Full-Featured PostgreSQL C... by keb_ on Friday March 25, 2022 @12:42PM (#30804328)
Yep! I'm the same way -- it comes from a love of simplicity and an affair I had with Lua, which I find marvelously simple and inspirational.
Re:Show HN: Postgres.js – Fastest Full-Featured PostgreSQL C... by Aeolun on Friday March 25, 2022 @07:44AM (#30800911)
Some people really love the simplicity that comes from zero compilation.

I like that too, so I always start with just JS, but then two files in realize I really want my typings.

Now I use esbuild instead of tsc, and I have the best of both worlds.

Re:Show HN: Postgres.js – Fastest Full-Featured PostgreSQL C... by keb_ on Friday March 25, 2022 @12:40PM (#30804300)
> Now I use esbuild instead of tsc, and I have the best of both worlds.

I'm interested in this. I know esbuild can compile TypeScript to JS, but that it doesn't serve as an actual typechecker. Without tsc as a dev dependency, do you just rely on your IDE's intellisense to tell you when there's a type error?

Re:Show HN: Postgres.js – Fastest Full-Featured PostgreSQL C... by Aeolun on Saturday March 26, 2022 @09:53PM (#30817052)
I still install tsc, but I don’t actually do the type checking except at release time (and whatever typechecking the IDE provides through the language server).