https://github.com/rangertaha/langorithms
An Exploration of the Fundamental Building Blocks of Programming Languages
https://github.com/rangertaha/langorithms
bash golang javascript lua python rust typescript
Last synced: 3 months ago
JSON representation
An Exploration of the Fundamental Building Blocks of Programming Languages
- Host: GitHub
- URL: https://github.com/rangertaha/langorithms
- Owner: rangertaha
- License: gpl-3.0
- Created: 2019-09-18T10:52:23.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-12-02T04:37:59.000Z (over 1 year ago)
- Last Synced: 2025-01-23T03:15:49.343Z (over 1 year ago)
- Topics: bash, golang, javascript, lua, python, rust, typescript
- Language: TypeScript
- Homepage: https://langorithms.readthedocs.io/en/latest/
- Size: 2.92 MB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [Langorithms](https://langorithms.readthedocs.io/en/latest/)
While diverse in syntax and paradigms, programming languages comprise a common set of fundamental building blocks. Here's a breakdown:
## **Syntax**
- **Definition**: Rules that define the structure of valid statements.
- **Examples**: Keywords, symbols, indentation, punctuation.
## **Data Types**
- **Primitive Types**: Integer, Float, Boolean, Character, String.
- **Composite Types**: Arrays, Lists, Tuples, Maps, Sets.
- **User-defined Types**: Classes, Enums, Structs.
## **Variables and Constants**
- **Variables**: Named storage for mutable data.
- **Constants**: Immutable values.
## **Control Structures**
- **Conditional Statements**: `if`, `else`, `switch`.
- **Loops**: `for`, `while`, `do-while`.
- **Break/Continue**: Alter loop execution flow.
## **Functions**
- **Definition**: Reusable blocks of code.
- **Components**: Parameters, Return values, Scope.
- **Variants**: Lambdas, Anonymous Functions, Generators.
## **Object-Oriented Constructs** (Optional)
- **Classes/Objects**: Encapsulation of state and behavior.
- **Inheritance**: Sharing functionality across classes.
- **Polymorphism**: Multiple forms of functions or methods.
## **Memory Management**
- **Static Allocation**: Fixed memory at compile-time.
- **Dynamic Allocation**: Variable memory at runtime.
- **Garbage Collection**: Automatic memory cleanup (optional).
## **Error Handling**
- **Mechanisms**: `try`, `catch`, `finally`, `throw`.
- **Patterns**: Return codes, Exceptions.
## **Input/Output**
- **File I/O**: Read/write to files.
- **Console I/O**: User interaction through the terminal.
- **Network I/O**: Communication over protocols (HTTP, TCP).
## **Concurrency** (Optional)
- **Threads/Processes**: Parallel execution.
- **Locks/Mutexes**: Synchronization.
- **Async/Await**: Non-blocking operations.
## **Libraries/Modules**
- **Built-in Libraries**: Standard functionality.
- **Third-party Modules**: Extensible components.
- **Import Mechanisms**: `import`, `require`, `use`.
## **Compilation and Interpretation**
- **Compilers**: Transform code to machine language.
- **Interpreters**: Execute code line-by-line.
- **Hybrid**: Bytecode execution (e.g., JVM, Python).
## **Type Systems**
- **Static Typing**: Checked at compile-time.
- **Dynamic Typing**: Checked at runtime.
- **Type Inference**: Automatic type deduction.
## **Metadata**
- **Annotations**: Meta-information for the compiler/runtime.
- **Comments**: Human-readable explanations.
## **Execution Environment**
- **Virtual Machines**: Platform independence (e.g., JVM).
- **Native Execution**: Platform-specific binaries.
## **Extensibility**
- **Macros**: Code-generation tools.
- **Plugins**: Extendable functionality.
## **Security Constructs**
- **Access Control**: Private, Public, Protected.
- **Encryption Libraries**: Cryptography support.
- **Sandboxing**: Isolated execution.
## **Tooling**
- **Package Management**: Installing, maintaining, and publishing libraries.
- **Linting**: Checking code for style issues, bugs, and errors
- **Build**: Compiling or pacakging code for distribution
- **Test**: Running unit tests
- **Run**: Run code during development
- **Publish**: publish to code specific repositories
This breakdown encapsulates the foundational concepts present in most programming languages.