Slope, aka SLOum's Programming Environment, is a programming language created in 2021 by Sloum.
| #354on PLDB | 5Years Old |
git clone https://git.rawtext.club/slope-lang/slopeA small s-expression based programming language
; hello world
(define greeting "Hello")
(display greeting ", world!\n")
define set! lambda cond case if for load load-mod load-mod-file usage macro eval apply and or begin begin0 exists coeval| Feature | Supported | Example | Token |
|---|---|---|---|
| Conditionals | ✓ | (if positive? 1 -1) | |
| Zero-based numbering | ✓ | ||
| Switch Statements | ✓ | (case my-num (5 (display "Five!")) (0 (display "Zero!")) (else (display "Not an option"))) | |
| Variadic Functions | ✓ | (lambda (...) (apply + ...)) | |
| Case Sensitivity | ✓ | ||
| File Imports | ✓ | (load-mod my-module) (load "examples/test.slo") | |
| Garbage Collection | ✓ | ||
| Strings | ✓ | "hello world" `hello wold` | " |
| canUseQuestionMarksAsPartOfIdentifier | ✓ | (define yes? #t) | |
| Namespaces | ✓ | (ns-create 'hello-world) (ns-define 'hello-world 'print (lambda () (display "hello world!\n"))) (hello-world::print) | |
| hasBuiltInRegex | ✓ | (regex-match? `[0-9]+` "Hello 12345") (regex-replace `Hello, (\w+)!$` "Hello, world!" "Goodbye, $1!") | |
| Comments | ✓ | ; I am a comment | |
| Line Comments | ✓ | ; I am a comment | ; |
| Booleans | ✓ | (define open? #t) | #t #f |
| Bitwise Operators | ✓ | (& 0xFF 0x1B) | |
| Prefix Notation | ✓ | (+ 1 2) | |
| Macros | ✓ | ||
| Increment and decrement operators | X | ||
| Gotos | X | ||
| Semantic Indentation | X |