Rohit Sachdeva

@rsachdeva
0 Followers
7 Following
7 Posts
#Golang #Go #Ziglang #Zig #Rustlang #Rust Senior Backend & Systems Software Engineer https://github.com/rsachdeva
Check out the official list of Go replacements: pkg.go.dev/golang.org/x/tools/go/analysis/passes/modernize
From Go 1.26+, `go fix` helps you with each of these replacements automatically! #golang

#golang
• for {} — Header omission = true.
• switch {} — Header omission = true (if/else chain).

#ziglang
• while (true) {} — Header requires explicit true.
• if / else — Standard conditionals; switch requires expression.

It’s great to see the #golang compiler using stack allocations to kill those noisy 1, 2, and 4-item heap allocations—even for escaping slices.
Optimized performance, automatically. https://go.dev/blog/allocation-optimizations
become allocation aware #ziglang
Allocating on the Stack - The Go Programming Language

A description of some of the recent changes to do allocations on the stack instead of the heap.

Catch compile time errors in your comptime assertion blocks in tests, skip runtime test execution: `zig test --test-no-exec <file.zig>` #ZigLang #Zig
-freference-trace[=num]: How many lines of reference trace should be shown per compile error—handy for getting more context without noisy output.
#ziglang often tells you “references hidden; use -freference-trace=…” in the error message. #zig