Cross-language keyword reference comparing Python, Dart, TypeScript, and Rust. Keywords aligned by concept and function for easy language switching and learning.
This repository provides a comprehensive, side-by-side comparison of keywords across four major programming languages. Unlike traditional keyword lists, this reference aligns keywords by their conceptual meaning and function, making it invaluable for:
- π Language Migration: Switching between languages
- π Learning: Understanding language design patterns
- π Quick Reference: Finding equivalent keywords instantly
- π₯ Team Collaboration: Working with polyglot codebases
| Language | Keywords Count | Focus Area |
|---|---|---|
| Python | 35 | Simplicity & Readability |
| Dart | 52+ | Flutter & Web Development |
| TypeScript | 50+ | Type-Safe JavaScript |
| Rust | 40+ | Memory Safety & Performance |
Looking for class definition across languages?
Python: class Dart: class TypeScript: class Rust: struct
Python: True/False Dart: true/false TypeScript: true/false Rust: true/false
Python: - Dart: switch TypeScript: switch Rust: match
| Concept | Python | Dart | TypeScript | Rust |
|---|---|---|---|---|
| Type Casting | as | as | as | as |
| Async Programming | async | async | async | async |
| Async Await | await | await | await | await |
| Loop Control - Break | break | break | break | break |
| Loop Control - Continue | continue | continue | continue | continue |
| Conditional - Else | else | else | else | else |
| Loop - For | for | for | for | for |
| Conditional - If | if | if | if | if |
| Membership Test | in | in | in | in |
| Function Return | return | return | return | return |
| Loop - While | while | while | while | while |
| Object Definition | class | class | class | struct |
| Constants | - | const | const | const |
| Enumerations | - | enum | enum | enum |
| Boolean False | False | false | false | false |
| Static Members | - | static | static | static |
| Inheritance | - | super | super | super |
| Boolean True | True | true | true | true |
| Exception Handling | try | try | try | - |
| Context/Resource | with | with | with | - |
| Generators | yield | yield | yield | - |
| Import/Use | import | import | import | use |
| Type Definition | - | - | type | type |
| Variable Declaration | - | var | var | let |
| Function Definition | def | - | function | fn |
| Abstract Classes | - | abstract | abstract | - |
| Assertion | assert | assert | - | - |
| Switch Case | - | case | case | - |
| Exception Catch | - | catch | catch | - |
| Switch Default | - | default | default | - |
| Do Loop | - | do | do | - |
| Module Export | - | export | export | - |
| Class Extension | - | extends | extends | - |
| Property Getter | - | get | get | - |
| Interface Implementation | - | implements | implements | trait |
| Type Check | is | is | - | - |
| Object Creation | - | new | new | - |
| Null Value | None | null | null | - |
| Property Setter | - | set | set | - |
| Switch Statement | - | switch | switch | match |
| This Reference | self | this | this | self |
| Exception Throw | - | throw | throw | - |
| Void Type | - | void | void | - |
| Logical AND | and | - | - | - |
| Boolean/Logical NOT | not | - | - | - |
| Logical OR | or | - | - | - |
| Function Expression | lambda | - | - | - |
| Exception Handling | except | - | - | - |
| Exception Finally | finally | finally | finally | - |
| Variable Deletion | del | - | delete | - |
| Conditional Elif | elif | - | - | - |
| Exception Raise | raise | - | - | - |
| No Operation | pass | - | - | - |
| Global Scope | global | - | - | - |
| Nonlocal Scope | nonlocal | - | - | - |
| Module Import From | from | - | from | - |
| Execution | exec | - | - | - |
| Any Type | - | - | any | - |
| Boolean Type | - | - | boolean | - |
| Constructor | - | - | constructor | - |
| Declaration | - | - | declare | - |
| Instance Check | - | - | instanceof | - |
| Interface | - | interface | interface | - |
| Key Of Type | - | - | keyof | - |
| Module System | - | - | module | mod |
| Namespace | - | - | namespace | - |
| Never Type | - | - | never | - |
| Number Type | - | - | number | - |
| Object Type | - | - | object | - |
| Of Operator | - | - | of | - |
| Package | - | - | package | - |
| Access Private | - | - | private | priv |
| Access Protected | - | - | protected | - |
| Access Public | - | - | public | pub |
| Readonly | - | - | readonly | - |
| Require | - | - | require | - |
| String Type | - | - | string | - |
| Symbol Type | - | - | symbol | - |
| Type Of | - | - | typeof | - |
| Undefined | - | - | undefined | - |
| Unique | - | - | unique | - |
| Unknown Type | - | - | unknown | - |
| Deferred Loading | - | deferred | - | - |
| Dynamic Type | - | dynamic | - | dyn |
| External | - | external | - | extern |
| Factory Constructor | - | factory | - | - |
| Final | - | final | - | - |
| Hide Library | - | hide | - | - |
| Late Initialization | - | late | - | - |
| Library | - | library | - | crate |
| Mixin | - | mixin | - | - |
| On Clause | - | on | - | - |
| Operator | - | operator | - | - |
| Part | - | part | - | - |
| Required | - | required | - | - |
| Rethrow | - | rethrow | - | - |
| Show Library | - | show | - | - |
| Sync | - | sync | - | - |
| Type Definition | - | typedef | - | - |
| Implementation | - | - | - | impl |
| Loop | - | - | - | loop |
| Move Ownership | - | - | - | move |
| Mutable | - | - | - | mut |
| Reference | - | - | - | ref |
| Self Type | - | - | - | Self |
| Unsafe | - | - | - | unsafe |
| Where Clause | - | - | - | where |
Core programming concepts shared across all languages:
- Control Flow:
if,else,for,while,break,continue,return - Modern Features:
async,await,as
- Object-Oriented Trio: Dart and TypeScript share many OOP keywords
- Systems Programming: Rust has unique memory safety keywords (
mut,unsafe,move) - Python's Philosophy: Fewer, more readable keywords (
elifvselse if)
- Rust: No traditional exception handling (
try/catch) - Python: No built-in constants declaration or static typing keywords
- TypeScript: Inherits JavaScript's limitations, adds type system
Coming from Python and learning Rust?
- Python `def` β Rust `fn`
- Python `True` β Rust `true`
- Python `class` β Rust `struct`Converting TypeScript to Dart?
- Both use: `class`, `async`, `await`, `try`, `catch`
- TypeScript `interface` β Dart `abstract class` or `mixin`
- TypeScript `type` β Dart `typedef`Use this reference to establish consistent patterns across your polyglot codebase.
| Metric | Count |
|---|---|
| Total Unique Keywords | 100+ |
| Shared Across All 4 | 11 |
| Shared Across 3 | 15 |
| Shared Across 2 | 20+ |
| Language-Specific | 50+ |
- Polyglot Developers switching between languages
- Code Migration projects
- Learning new programming languages
- Technical Documentation and training
- Interview Preparation for multiple languages
- Understand language design philosophy
- Compare feature completeness across languages
- Learn modern programming concepts (async/await, pattern matching)
- Identify missing features in your target language
We welcome contributions! Here's how you can help:
- Java, C#, Go, Swift, Kotlin, etc.
- Follow the existing format and alignment principles
- Spot missing keywords or incorrect mappings
- Add context-specific notes
- Improve conceptual groupings
- Add usage examples
- Improve descriptions
- Create visual aids
Getting Started:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Language specification teams for comprehensive documentation
- Developer communities for keyword usage patterns
- Contributors who help maintain accuracy and completeness
Found this helpful? β Star the repository and share with fellow developers!
Have questions? π¬ Open an issue or start a discussion.