Hacker Newsnew | past | comments | ask | show | jobs | submit | more theThree's commentslogin

You can still control it by adding "//no-await". In fact, the "//no-await" makes me feel more clear.


I created a ticket, using comments is not necessary because there is already the `void` syntax for when you don't want to wait:

https://github.com/stanNthe5/typescript-autoawait/issues/1


Maybe at some point. Their vsCode extension has 1M downloads, while Bun has 155k.


That might be because Bun doesn't need an editor extension. It has type definitions and works fine with the built-in TypeScript language server, formatter, etc.


In web backend, Node.js is not slower than Go.


Execution performance might be similar, but Node.js and Deno execution performance are also similar (both use v8 – there is only so much you can optimize beyond that), so clearly the comment is not talking about execution performance. Deno sells itself as having faster development performance, so presumably that is what performance is in reference to.

It is hard to deny that Go isn't much more performant on the development end. Someone who is inexperienced might be slowed down due to that inexperience negating the performance boost, sure, but when one is concerned about developer performance they will be happy to incur the small upfront cost to become experienced for the bigger payoff later.

(It is debatable if Go is really the king of developer performance, you might do even better with another language, but what is certain is that it is not Javascript/Typescript)


For some applications especially those that benefit from cpu-bound parallelism, it is possible to write much faster code with Go than Node.js, e.g., consider the recent port of the Typescript compiler from Javascript to Go:

- https://news.ycombinator.com/item?id=43332830


I think 9rx agrees with you. Node.js shines as a web server. It can be made fast at CPU-bound tasks as well, but you wouldn't be writing idiomatic JS/TS.

The recent tsc port from TS to Go is a good example of that. The TypeScript code in the compiler relied a lot on polymorphism, which made it really hard for the JIT to do a good job.

The Go port enabled them to 'rewrite' it keeping the logic more-or-less 1:1 and land a good performance increase. IMO it was a good decision, specially the language choice, and much saner than what a JIT-friendly TS compiler would be.


[citation needed]


From my own testing. In high-concurrency scenarios, their performance is roughly the same, and Node uses less memory. When it comes to string concatenation, Go has to do a lot of extra work (no "+",Estimating string length, Preallocate memory ) just to catch up with the speed of Node (simply using "+").


Eh, there’s some use cases where you can see some speedup from going to Go/Rust, but I’ll admit they’re pretty minimal.


    function f1(a:number, b:number, c:number, d:number) {
        [a, b] = [b, a]
        [c, d] = [d, c]
        console.log(a, b, c, d)
    }
For the above codes Typescript gives error message: Type 'number[]' is not assignable to type 'number'.


>That means you have 1 GiB in the pool.

This only happen when every request last 1 second.


Chinese are unable to visit ChatGPT.


Can anyone explain to me what is "TypeScript types“?


The appeal of Go is goroutine.


Java has virtual threads with better and safer ergonomics.


> a, b := 20, 30 // accepted. why ??

I guess it is a dept of error handling. Otherwise you have to write "foo,err1 := Foo();bar,err2 := Bar(),.."


Context is useful in many cases. In go I have to pass ctx from func to func. In nodejs I can easily create&use context by using AsyncLocalStorage (benefit of single-thread).


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: