about
Bits Track Summary
04/15/2024
Bits Repo Docs Bits Code Repo

Bits Track Summary

Comparisons of C++, Rust, C#, Python, and JavaScript

Bits Index Bits Track Summary Overview of Bits Bits Repository Document for Bits code repository Introduction Initial language comparisons Tooling Compilers, builders, VS Code IDE C++ Hello "Hello World" program with links to Rust, C#, Python, and JavaScript C++ Data Basic types and instances C++ Objects Standard and user-defined types C++ Generics Generic types and functions C++ Iteration Iterators and iteration    
Figure 1. Rust demo code
"It's bits and pieces of truth, but it is storytelling."
- Ray LaMontagne

What are Bits?
  • Comparisons of compilable language fragments
    • C++ compiles to native code, is fast, flexible, and complex
    • Rust compiles to native code, is fast, flexible, and mostly simple
    • C# compiles to managed bytecode, is jitted at load time, is flexible, but lower throughput and higher latency than C++ or Rust.
    • Python is dynamic code, interpreted into code blocks, translated at run-time, is simple and flexible, but slower than C#.
    • JavaScript is dynamic code, interpreted at load time, executed in an event loop, is slower than C#.
  • For each language a series of levels
Bits are small fragments of code, like that shown in Figure 1., written in each of five commonly used languages: C++, Rust, C#, Python, and JavaScript. The purpose is to learn or refresh a language based on comparisons with code from another familiar language. Bits show:
  1. how to acquire and setup tools from each of the five languages
  2. write a simple "Hello World" program to test the installations
  3. Basics of each language type system
  4. How to use library types
  5. How to create and use custom types
  6. more to come, e.g., iteration, functions, ...
First Bit Most of the code examples are accompanied by executable code running in Compiler Explorer.
Comparison of five languages with Highs and Lows for each.
  Next Prev Pages Sections About Keys