Skip to content
StackDecode

Syntax Compare

20 languages side by side, from hello world to concurrency and GPU kernels: Python, C++, Rust, CUDA, Triton, WGSL and more.

NewmediumRuns in your browser

How it works

Pick a topic on the left and the languages you want to compare. Topics run from basic (variables, loops, functions) through intermediate (types, errors, generics, files) to advanced (concurrency, memory), and a GPU & shaders track (kernels, shared memory, atomics, launching work).

  • Python snippets have a Run button that executes them in your browser.
  • CUDA, HIP, OpenCL, SYCL and Triton are for general GPU compute. Metal, HLSL, GLSL and WGSL are shader languages, so they have no printing, files or strings; where a concept does not exist the card says why.
  • GPU examples assume a launch like the one in “Launching work”. They show the kernel, not a full runnable program.
  • Snippets are short teaching examples, not production code. Zig and Mojo change between releases, so check their docs if one does not compile on your version.
  • Your language selection is remembered in this browser only.