CommunityNews
TypeScript as fast as Rust: TypeScript++
TL;DR: This is a proposal to create a language that sits somewhere between Typescript and Rust, and which you can incrementally adopt if you already use Typescript.
Typescript and Rust can feel pretty similar:
// Typescript type Vec2 = { x: number, y: number }; function avgLen(vecs: Vec2[]): number { let total = 0; for (const vec of vecs) { total += Math.sqrt(vec.x*vec.x + vec.y*vec.y); } return total / vecs.length; }// Rust struct Vec2 { x: f64, y: f64 } fn avg_len(vecs: &[Vec2]) -> f64 { let mut total = 0.0; for vec in vecs { total += (vec.x*vec.x + vec.y*vec.y).sqrt(); } return total / vecs.len() as f64; }In some ways, Rust feels like a more restrictive but faster version of Typescript. But Typescript/Javascript can be very fast too; owing to years of hard work by browser vendors. In this article we’ll look at the performance characteristics of each in more detail, and see if we can have the best of both worlds.
Read in full here:
https://zaplib.com/docs/blog_ts++.html
This thread was posted by one of our members via one of our news source trackers.
Popular Backend topics
In recent months I use Go for the implementation of Proof of Concept in my leisure time, partly to study of Go programming language itsel...
New
GitHub - nanobowers/py2cr: Python3 to Crystal Translation using Python AST Walker.
Python3 to Crystal Translation using Python AST Walke...
New
Building a Neural Network in Pure Lisp without Built-in Numbers using only Atoms and Lists.
A neural network written in pure Lisp withou...
New
GitHub - deadpixi/wasm-maze-generator: A simple WASM maze generator in Go.
A simple WASM maze generator in Go. Contribute to deadpixi/wa...
New
Rails is not written in Ruby.
I’m born and raised in Kraków, a beautiful city in Poland, maybe you’ve heard about it, maybe you’ve even ...
New
Haskell in Production: Freckle.
In this interview, we talk with Pat Brisbin, a Principal Engineer at Freckle, a company that helps teach...
New
clog/LEARN.md at main · rabbibotton/clog.
CLOG - The Common Lisp Omnificent GUI. Contribute to rabbibotton/clog development by creating ...
New
Ruby 3.1’s incompatible changes to its YAML module (Psych 4).
Ruby made its YAML interpreter more secure by default at the cost of backw...
New
Ruffle is a Flash Player emulator written in Rust. Ruffle runs natively on all modern operating systems as a standalone application, and ...
New
Some Thoughts on Zig — Sympolymathesy, by Chris Krycho.
One of the biggest things Zig has going for it—especially compared to Rust—is th...
New
Other popular topics
If it’s a mechanical keyboard, which switches do you have?
Would you recommend it? Why?
What will your next keyboard be?
Pics always w...
New
New
Please tell us what is your preferred monitor setup for programming(not gaming) and why you have chosen it.
Does your monitor have eye p...
New
There’s a whole world of custom keycaps out there that I didn’t know existed!
Check out all of our Keycaps threads here:
https://forum....
New
Saw this on TikTok of all places! :lol:
Anyone heard of them before?
Lite:
New
Was just curious to see if any were around, found this one:
I got 51/100:
Not sure if it was meant to buy I am sure at times the b...
New
Author Spotlight
Jamis Buck
@jamis
This month, we have the pleasure of spotlighting author Jamis Buck, who has written Mazes for Prog...
New
Develop, deploy, and debug BEAM applications using BEAMOps: a new paradigm that focuses on scalability, fault tolerance, and owning each ...
New
A Brief Review of the Minisforum V3 AMD Tablet.
Update: I have created an awesome-minisforum-v3 GitHub repository to list information fo...
New
Curious what kind of results others are getting, I think actually prefer the 7B model to the 32B model, not only is it faster but the qua...
New
Categories:
Sub Categories:
Popular Portals
- /elixir
- /rust
- /ruby
- /wasm
- /erlang
- /phoenix
- /keyboards
- /python
- /js
- /rails
- /security
- /go
- /swift
- /vim
- /clojure
- /emacs
- /haskell
- /java
- /svelte
- /onivim
- /typescript
- /kotlin
- /c-plus-plus
- /crystal
- /tailwind
- /react
- /gleam
- /ocaml
- /elm
- /flutter
- /vscode
- /ash
- /html
- /opensuse
- /zig
- /centos
- /deepseek
- /php
- /scala
- /react-native
- /lisp
- /sublime-text
- /textmate
- /nixos
- /debian
- /agda
- /django
- /kubuntu
- /arch-linux
- /deno
- /nodejs
- /revery
- /ubuntu
- /manjaro
- /spring
- /diversity
- /lua
- /markdown
- /julia
- /c








