💾 Archived View for yujiri.xyz › software › my-ideal-lang.gmi captured on 2023-05-24 at 17:50:53. Gemini links have been rewritten to link to archived content
View Raw
More Information
⬅️ Previous capture (2023-04-19)
➡️ Next capture (2023-07-10)
-=-=-=-=-=-=-
yujiri.xyz
Software
What I want in a programming language
Broad strokes
Interpretation is a sin
- No garbage collection. I want it to have some sort of compile-time memory management system like Rust, but I'm open to innovation on the specifics, and also could settle for manual memory management if there are tools to make it easier, like Zig.
Type system
Essentials:
- Tagged unions or sum types
- Static arrays (as in Rust)
- A static polymorphism system like Rust's traits or Zig's opt-in duck typing
Ideally also, in order of importance:
- A dynamic polymorphism system like Rust's trait objects
- Binary operators on custom types (like +, - on 2D coordinates)
- Negative indexing (as in Python)
Errors
I want errors to work like a combination of Rust and Zig:
- I want the `orelse` and `catch` keywords (Zig)
- I want it to be easy to use different error types together (Zig)
- I want errors to be able to carry information (Rust)
- I want to reuse the concept of sum types instead of making optionals and error unions language-level features (Rust)
Tooling
- Documentation generator that allows command-line viewing like Go.
- Built-in formatter, or if not, a good third-party one that's popular enough to be considered the standard style of the language. I also want its style to be reasonable, unlike rustfmt. I want me to be in charge of deciding when to break a line.
Macros
I want something like this to overcome the limits of static typing without resorting to runtime reflection. What Rust has might be more flexible than I want, and I definitely don't want there to be like 5 different macro systems like Rust has. I want something more like what Crystal has. Even Zig, despite claiming not to have macros, checks this box for me, because comptime constructs like `inline for` can be used to emulate most uses of macros.
contact
subscribe via RSS