You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My first thoughts for a TS-like native language was that it would lower the barriers to entry for writing N-API plugins. Currently most Node tools are being re-written in Rust for performance, but the learning curve is high.
If there was first-class N-API support, and great C library integration, then BS could become the language of choice for writing N-API plugins.
Imagine if wanting to make a TS function fast, was just a matter of changing the file extension to .bs and interoperability with TS code would be seamless. You could use Node's ESM --experimental-loader to achieve this.
It would be interesting to look at a few JS libraries, and see the minimal set of syntax changes that would need to be made to achieve perf improvements as well as safety. Rust trades off ergonomics for explicitness and safety, maybe BS could go the other direction.
This discussion was converted from issue #25 on February 17, 2023 23:07.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
My first thoughts for a TS-like native language was that it would lower the barriers to entry for writing N-API plugins. Currently most Node tools are being re-written in Rust for performance, but the learning curve is high.
If there was first-class N-API support, and great C library integration, then BS could become the language of choice for writing N-API plugins.
Imagine if wanting to make a TS function fast, was just a matter of changing the file extension to
.bs
and interoperability with TS code would be seamless. You could use Node's ESM--experimental-loader
to achieve this.It would be interesting to look at a few JS libraries, and see the minimal set of syntax changes that would need to be made to achieve perf improvements as well as safety. Rust trades off ergonomics for explicitness and safety, maybe BS could go the other direction.
Beta Was this translation helpful? Give feedback.
All reactions