4 ms·
I generally agree with the 4 tier categorization: 1. C/C++/Rust 2. Java/Go/OCaml 3. MyPy, TypeScript 4. Python, JavaScript But I'd also add 2
by chubot 2y ago
I generally agree with the 4 tier categorization:
1. C/C++/Rust
2. Java/Go/OCaml
3. MyPy, TypeScript
4. Python, JavaScript
But I'd also add 2 or 3 more tiers:
5. String-ish languages without GC - Shell, Awk, Make, CMake [1]
6. Configuration Languages - YAML / TOML - declaring data structures [2]
7. Data Notations - JSON, HTML, CSV - Objects, Documents, Tables [3]
The goal of YSH is actually to *unify tiers 4, 5, 6, and 7* under one language. The slogan I've been using is "minimal YSH is shell+Python+JSON+YAML"
Instead of having Unix sludge (autotools - m4 generating make) and Cloud sludge (Helm - Go templates generating YAML), you have one language
- YSH is the code dialect -- it is a shell with real data types like Python
- and with reflection like Ruby/Python, not generating text
- Hay (Hay Ain't YAML) is the data dialect
- and we have built-in JSON, etc.
This is a hard design challenge, but I just made a release with an overhaul of Hay - https://oils.pub/release/0.28.0/ https://oils.pub/release/0.28.0/
Hay version 1 was hard-coded in the interpreter - https://oils.pub/release/0.28.0/doc/hay.html https://oils.pub/release/0.28.0/doc/hay.html
But we realized it's actually better to self-host it in YSH, using YSH reflection. We will be testing this by rewriting Hay in YSH
---
So that's our language design response to https://news.ycombinator.com/item?id=43386115 https://news.ycombinator.com/item?id=43386115
> It's madness that languages are effectively siloed from each other.
Instead of tiers 4, 5, 6 being silo'd, we have them all under YSH and the Oils runtime (which is tiny, 2.3 MB of pure native code).
(As a bonus, OSH also runs on the Oils runtime, and it's the most bash-compatible shell!)
----
[1] Garbage Collection Makes YSH Different - https://www.oilshell.org/blog/2024/09/gc.html https://www.oilshell.org/blog/2024/09/gc.html
Shell, Awk, and Make Should Be Combined - https://www.oilshell.org/blog/2016/11/13.html https://www.oilshell.org/blog/2016/11/13.html - all these languages lack GC!
[2] Survey of Config Languages - https://github.com/oils-for-unix/oils/wiki/Survey-of-Config-Languages https://github.com/oils-for-unix/oils/wiki/Survey-of-Config-... - divides this category into 5 tiers:
1. Languages for String Data
2. Languages for Typed Data
3. Programmable String-ish Languages
4. Programmable Typed Data
5. Internal DSLs in General Purpose Languages
[3] Zest: Notation and Representation addresses this - https://www.scattered-thoughts.net/writing/notation-and-representation/ https://www.scattered-thoughts.net/writing/notation-and-repr...
YSH also has a common subset with J8 Notation (which is a superset of JSON)