
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

Wren is a small, fast, class-based concurrent scripting language.
Think Smalltalk in a Lua-sized package with a dash of Erlang and wrapp...
New
New

As I continue to work on Cyberscore, I keep finding new quirks / features in PHP and MySQL. All of the tests below are being run on mysql...
New

FreeBSD allows the management of multiple instances of PostgreSQL by means of rc.conf(5) .
The trick is to use profiles , that are avail...
New

Tails is a minimal, fast Forth-like interpreter core. It uses no assembly code, only C++, but an elegant tail-recursion technique inspire...
New

C++ Programming - The State of Developer Ecosystem in 2021 Infographic.
The State of Developer Ecosystem 2021 is a detailed report about...
New

TLDR; the future of ML is Julia. If you are looking for a quick answer, there you have it. If you want the well reasoned explanation, sti...
New

For the first 8 or so years of my programming experience, while I was an undergraduate and later graduate student, working in the experim...
New

Martin Thompson On How To Manage Software Complexity | The Engineering Room Ep. 4.
In this episode, Dave Farley chats with Martin Thomps...
New

Letting Go of Random.
In a recent post I shared some thoughts about art and included a few, somewhat tongue-in-cheek comments about the ...
New
Other popular topics

Hello Devtalk World!
Please let us know a little about who you are and where you’re from :nerd_face:
New

On modern versions of macOS, you simply can’t power on your computer, launch a text editor or eBook reader, and write or read, without a ...
New

Not sure if following fits exactly this thread, or if we should have a hobby thread…
For many years I’m designing and building model air...
New

Small essay with thoughts on macOS vs. Linux:
I know @Exadra37 is just waiting around the corner to scream at me “I TOLD YOU SO!!!” but I...
New

The V Programming Language
Simple language for building maintainable programs
V is already mentioned couple of times in the forum, but I...
New

A few weeks ago I started using Warp a terminal written in rust. Though in it’s current state of development there are a few caveats (tab...
New

If you get Can't find emacs in your PATH when trying to install Doom Emacs on your Mac you… just… need to install Emacs first! :lol:
bre...
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

The overengineered Solution to my Pigeon Problem.
TL;DR: I built a wifi-equipped water gun to shoot the pigeons on my balcony, controlle...
New

Author Spotlight:
Bruce Tate
@redrapids
Programming languages always emerge out of need, and if that’s not always true, they’re defin...
New
Categories:
Sub Categories:
Popular Portals
- /elixir
- /rust
- /ruby
- /wasm
- /erlang
- /phoenix
- /keyboards
- /rails
- /js
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /emacs
- /haskell
- /java
- /onivim
- /svelte
- /typescript
- /crystal
- /c-plus-plus
- /kotlin
- /tailwind
- /gleam
- /ocaml
- /react
- /elm
- /flutter
- /vscode
- /ash
- /opensuse
- /centos
- /php
- /deepseek
- /html
- /zig
- /scala
- /sublime-text
- /textmate
- /debian
- /nixos
- /lisp
- /agda
- /react-native
- /kubuntu
- /arch-linux
- /django
- /ubuntu
- /revery
- /manjaro
- /spring
- /nodejs
- /diversity
- /lua
- /slackware
- /c
- /julia
- /neovim