Skip to content

Cross-language keyword reference comparing Python, Dart, TypeScript, and Rust. Keywords aligned by concept and function for easy language switching and learning.

License

Notifications You must be signed in to change notification settings

bixat/language-keywords-reference

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Programming Language Keywords Reference

Cross-language keyword reference comparing Python, Dart, TypeScript, and Rust. Keywords aligned by concept and function for easy language switching and learning.

License: MIT Contributors Welcome Languages

πŸš€ Overview

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

🌐 Supported Languages

Language Keywords Count Focus Area
Python 35 Simplicity & Readability
Dart 52+ Flutter & Web Development
TypeScript 50+ Type-Safe JavaScript
Rust 40+ Memory Safety & Performance

πŸ” Quick Examples

Finding Equivalents

Looking for class definition across languages?

Python: class     Dart: class     TypeScript: class     Rust: struct

Boolean Values

Python: True/False     Dart: true/false     TypeScript: true/false     Rust: true/false

Pattern Matching

Python: -     Dart: switch     TypeScript: switch     Rust: match

πŸ“Š Complete Keywords Table

Programming Language Keywords Reference Table

Keywords Aligned by Similarity and Function

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

πŸ’‘ Key Insights

Universal Keywords (All 4 Languages)

Core programming concepts shared across all languages:

  • Control Flow: if, else, for, while, break, continue, return
  • Modern Features: async, await, as

Language Families

  • 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 (elif vs else if)

Missing Concepts

  • 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

πŸ›  Usage Examples

For Language Learners

Coming from Python and learning Rust?
- Python `def` β†’ Rust `fn`
- Python `True` β†’ Rust `true` 
- Python `class` β†’ Rust `struct`

For Code Translation

Converting TypeScript to Dart?
- Both use: `class`, `async`, `await`, `try`, `catch`
- TypeScript `interface` β†’ Dart `abstract class` or `mixin`
- TypeScript `type` β†’ Dart `typedef`

For Team Standards

Use this reference to establish consistent patterns across your polyglot codebase.

πŸ“ˆ Statistics

Metric Count
Total Unique Keywords 100+
Shared Across All 4 11
Shared Across 3 15
Shared Across 2 20+
Language-Specific 50+

🎯 Use Cases

βœ… Perfect For

  • Polyglot Developers switching between languages
  • Code Migration projects
  • Learning new programming languages
  • Technical Documentation and training
  • Interview Preparation for multiple languages

πŸ“š Educational Value

  • Understand language design philosophy
  • Compare feature completeness across languages
  • Learn modern programming concepts (async/await, pattern matching)
  • Identify missing features in your target language

🀝 Contributing

We welcome contributions! Here's how you can help:

Add New Languages

  • Java, C#, Go, Swift, Kotlin, etc.
  • Follow the existing format and alignment principles

Improve Accuracy

  • Spot missing keywords or incorrect mappings
  • Add context-specific notes
  • Improve conceptual groupings

Enhance Documentation

  • Add usage examples
  • Improve descriptions
  • Create visual aids

Getting Started:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

🌟 Acknowledgments

  • 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.

About

Cross-language keyword reference comparing Python, Dart, TypeScript, and Rust. Keywords aligned by concept and function for easy language switching and learning.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published