PONYλM2Modula-2
CodeCompared
for Visual Basic programmers

You already know Visual Basic.Now explore other languages.

Side-by-side, interactive cheatsheets for Visual Basic programmers
comparing Visual Basic to other languages. Every example runs live in your browser — no setup, no installation.

▶ Start with RubyBrowse comparisons ↓Explore the language map ↗

Choose your own path by reordering languages

Ruby⚡ Works Offline⚡ Offline

The language that proved programmer happiness and raw power aren't a tradeoff, Ruby's open classes, expressive blocks, and radical object model influenced a generation of languages and frameworks — and still has no peer for writing code that reads like elegant prose.

    GoPre-Alpha

    Fast, opinionated, and built for the cloud era, Go trades Ruby's expressiveness for simplicity and raw speed.

    • Goroutines and channels — lightweight concurrency that makes Ruby's threads look heavy
    • Error handling without exceptions: functions return errors, you handle them explicitly
    • Interfaces without inheritance — implement the methods, satisfy the interface, no declaration needed
    • Pointers — the approachable kind, without manual malloc/free
    • Sub-second compile times for most programs — no waiting for the build before you can test
    JavaScriptAlpha⚡ Works Offline⚡ Offline

    The language of the web, JavaScript is unavoidable, powerful, and capable of running almost anywhere.

    • var / let / const vs. Ruby's local, instance, and global variables
    • Prototypal inheritance — a fundamentally different object model than Ruby's class-based one, with the inheritance machinery exposed and mutable at runtime
    • Closures and the this binding: a call-site-determined design that arrow functions exist to work around
    • Promises and async/await vs. Ruby's Fibers, threads, and Ractors
    • Destructuring, spread, and rest — features Ruby also has, with different syntax
    PythonBeta⚡ Works Offline⚡ Offline

    The closest major language to Ruby, Python shares Ruby's readable syntax and expressive idioms — a smaller leap than most, and dominant in data science and machine learning.

    • List comprehensions and generators vs. Ruby's Enumerable and blocks
    • Python's significant whitespace instead of Ruby's end keywords
    • The import system vs. require and Ruby's module hierarchy
    • try / except / finally vs. begin / rescue / ensure
    • Threading, the GIL, and asyncio vs. Ruby's concurrency model
    RustPre-Alpha

    Demanding but deeply rewarding, Rust proves memory safety and bare-metal speed aren't in opposition.

    • Ownership and borrowing — the idea that replaces garbage collection entirely
    • No runtime, no GC: memory safety enforced at compile time, not at runtime
    • Traits — like Ruby's modules, but verified statically and with zero overhead
    • Result and Option — making failure and absence explicit, not exceptional
    • Pattern matching with match — exhaustive, expressive, and more powerful than Ruby's case
    TypeScriptAlpha⚡ Works Offline⚡ Offline

    JavaScript with a type system, TypeScript is able to catch whole classes of bugs before they ship, without abandoning dynamism.

    • Type annotations vs. Ruby's duck typing — explicit contracts vs. implicit trust
    • Interfaces and structural typing: types describe shape, not lineage
    • Generics — like duck typing, but verified at compile time
    • Type narrowing: TypeScript removes impossible types as it reads your code
    • Utility types like Partial, Pick, and Readonly — a whole algebra of type transformations
    C#Pre-Alpha

    The same runtime, the same libraries, the same LINQ — a different way of writing them down. Visual Basic and C# compile to identical CLR bytecode, so nothing you know about List(Of T), Async/Await or the base class library is lost. What changes is the punctuation, a handful of semantics that genuinely differ, and a set of features C# has that Visual Basic never grew.

    • Braces replace every End If, End Sub and Next, and a semicolon ends each statement instead of the line break
    • Identifiers become case-sensitivetotal and Total are two names, and nothing corrects you
    • / between two integers truncates, where Visual Basic reserved \ for that and always made / floating-point
    • Is swaps meaning: C#'s is is the type test that was TypeOf ... Is, and reference comparison becomes ReferenceEquals
    • Records, pattern matching, switch expressions and deconstruction have no Visual Basic equivalent, and are the reason a port usually gets shorter
    • With blocks, the My namespace and On Error have no counterpart at all — each needs rewriting rather than translating
    JavaPre-Alpha

    The language Rubyists most often encounter in enterprise work, Java makes explicit what Ruby hides — types, access modifiers, checked exceptions, and the full machinery of a statically typed object system.

    • Static typing enforced at compile time — errors caught before the program ever runs
    • The JVM — bytecode, JIT, and garbage collection as a shared platform for Kotlin, Scala, Clojure, and more
    • Streams and lambdas (Java 8+) — functional-style collection operations that mirror Ruby's Enumerable
    • Records (Java 16+) — concise immutable data classes, Java's answer to Ruby's Struct
    • Pattern matching (Java 21+) — type-safe switch expressions that rival Ruby's case/in
    • Checked exceptions — the explicit error-contract system Ruby deliberately left out
    BashPre-Alpha

    The shell every Rubyist already uses, Bash rewards understanding — the more you know, the fewer Ruby scripts you'll write for things the shell does natively.

    • Parameter expansion — ${var:-default}, ${var^^}, ${var//old/new} — a mini-language for string manipulation
    • Associative arrays and indexed arrays — Bash's answer to Ruby's Hash and Array
    • Arithmetic expansion $(( )) — integer math without spawning a subprocess
    • Conditionals and loops — the original control flow, from which all other shells descended
    • Exit codes and traps — error handling before exceptions were invented
    PascalPre-Alpha

    The disciplined ancestor of modern programming — structured, strictly typed, and the language that taught a generation how to think algorithmically.

    • begin...end blocks instead of Ruby's implicit block delimiters
    • All variables declared in a var block before any code runs
    • := for assignment, = for comparison — the reverse of every other language
    • div for integer division; / always returns a real number
    • Procedures (no return value) vs. functions (returns a value) — an explicit distinction
    • Built-in set types, enumeration types, and subrange types with no library needed
    F#Pre-Alpha

    Functional-first on .NET, F# combines immutability by default, expressive pattern matching, and the pipe operator into a language that makes data transformation feel natural.

    • The |> pipe operator makes data pipelines read top-to-bottom — the idiomatic alternative to Ruby's method chaining
    • Immutable by default: let bindings cannot be reassigned without the explicit mutable keyword
    • Discriminated unions — typed sum types that replace Ruby's nil checks, symbol conventions, and class hierarchies
    • Exhaustive pattern matching enforced by the compiler — impossible to forget a case
    • Option and Result types replace nil and exceptions for expected failure paths
    • Full access to the .NET ecosystem alongside a clean functional core
    ElixirPre-Alpha

    The Erlang VM with a Ruby-inspired syntax, Elixir makes fault-tolerant, massively concurrent systems approachable — and beautiful.

    • The Actor model — processes communicate by message passing, no shared memory, no data races
    • Pattern matching and the pipe operator |> — code that reads like a transformation pipeline
    • Fault tolerance via supervisors — processes crash and restart automatically, by design
    • Macros and the AST — Elixir rewrites itself, just like Ruby's metaprogramming but at the syntax level
    • Phoenix Framework — a web framework that makes Rails look slow
    Drag cards to reorder · your order is saved locally