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
Pocketlang is a small (~3000 semicolons) and fast functional language written in C. It’s syntactically similar to Ruby and it can be lear...
New
In this episode, we look at some common functionality that we got with Rails UJS and what it looks like to reimplement these with Hotwire...
New
Multicore OCaml by kayceesrk · Pull Request #10831 · ocaml/ocaml.
This PR adds support for shared-memory parallelism through domains and...
New
By the end of this guide we’ll have a minimal, working implementation of a small part of Lua from scratch.
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
Writing a Game Boy Emulator in OCaml.
For the past few months, I have been working on a project called CAMLBOY, a Game Boy emulator that...
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
GitHub - audulus/rui: Experimental Rust UI library.
Experimental Rust UI library. Contribute to audulus/rui development by creating an a...
New
I am often fascinated by old tech.
While I do not have the experience nor the expertise on the subject, in the last months, some very sp...
New
Perfecting WebGPU/Dawn native graphics for Zig.
A 700+ commit complete rewrite of mach/gpu (the WebGPU interface for Zig) has been compl...
New
Other popular topics
Reading something? Working on something? Planning something? Changing jobs even!?
If you’re up for sharing, please let us know what you’...
New
New
Design and develop sophisticated 2D games that are as much fun to make as they are to play. From particle effects and pathfinding to soci...
New
I know that -t flag is used along with -i flag for getting an interactive shell. But I cannot digest what the man page for docker run com...
New
My first contact with Erlang was about 2 years ago when I used RabbitMQ, which is written in Erlang, for my job. This made me curious and...
New
Just done a fresh install of macOS Big Sur and on installing Erlang I am getting:
asdf install erlang 23.1.2
Configure failed.
checking ...
New
Do the test and post your score :nerd_face:
:keyboard:
If possible, please add info such as the keyboard you’re using, the layout (Qw...
New
I am trying to crate a game for the Nintendo switch, I wanted to use Java as I am comfortable with that programming language. Can you use...
New
Author Spotlight
Mike Riley
@mriley
This month, we turn the spotlight on Mike Riley, author of Portable Python Projects. Mike’s book ...
New
Fight complexity and reclaim the original spirit of agility by learning to simplify how you develop software. The result: a more humane a...
New
Categories:
Sub Categories:
Popular Portals
- /elixir
- /rust
- /ruby
- /wasm
- /erlang
- /phoenix
- /keyboards
- /python
- /js
- /rails
- /security
- /go
- /swift
- /vim
- /clojure
- /java
- /emacs
- /haskell
- /svelte
- /onivim
- /typescript
- /kotlin
- /c-plus-plus
- /crystal
- /tailwind
- /react
- /gleam
- /ocaml
- /flutter
- /elm
- /vscode
- /ash
- /html
- /opensuse
- /zig
- /centos
- /deepseek
- /php
- /scala
- /react-native
- /sublime-text
- /lisp
- /textmate
- /debian
- /nixos
- /agda
- /django
- /kubuntu
- /arch-linux
- /deno
- /nodejs
- /revery
- /ubuntu
- /spring
- /manjaro
- /lua
- /diversity
- /markdown
- /julia
- /slackware








