r/ProgrammingLanguages • u/Pie-Lang • Aug 06 '26
What's Next? Any New "Cool" Language Features?
It's been roughly one year since Pie got in development. August 5th marks Pie's 1 year anniversary.
During this year, I implemented:
- Variables
- Collections
- Functions
- Named Parameters
- Variadic Functions
- Fold Expressions
- Loops
- Classes & Objects
- Operator Overloading
- Namespaces
- Modules
- A Structural Type System
- Tagged Unions
- Pattern Matching
- Structured Bindings
- File IO
- C FFI (I even made a simple game with Raylib!)
- Cascade Operator
I also made a website that has:
- Basic Examples
- Docs
- Spec
- A Playground (I compiled the language to WASM)
These are roughly all the features that I liked from other languages. Of course, the work is not done. I can improve the internals of the language to make it faster, but feature-wise, I'm out of "cool" ideas.
I've scoured the sub for new ideas, but they either involved compile-time evaluation (my language is interpreted), didn't go well with the design of the language, or were already implemented in Pie.
So, I'm here to ask, what is a feature that is missing from my language that you think would be very cool to have?
8
u/runningOverA Aug 07 '26 edited Aug 07 '26
21
u/AustinVelonaut Admiran Aug 07 '26
Some things to consider:
5
u/catladywitch Aug 07 '26
coroutines? it's not "cool" but it'd be good to have them right?
5
u/Pie-Lang Aug 06 '26
Per AutoModerator's request I hereby confirm that this project did not use an LLM as part of the development process.
2
u/lumilesto Aug 07 '26
Enumeration or "Sum Type with tags", I mean actually union is Sum Type, but it can't allow same type added together, which is also use case of Sum Type.
2
u/L8_4_Dinner (Ⓧ Ecstasy/XVM) Aug 07 '26
Exceptions? Lambdas?
6
u/EggplantExtra4946 Aug 07 '26 edited Aug 07 '26
Looks like you didn't think this through. An interpreted language is the perfect setup for compile-time evaluation since the obvious way to do compile-time evaluation is with an interpreter.
Here's another feature: being able to pass any data structure by reference, including local variables, with an operator that explicitly create that reference.
6
u/koflerdavid Aug 08 '26
I don't think there's a point in merely accumulating language features. You could try to implement nontrivial applications and it will become obvious what could be useful and what has to be changed. For example, try the 1 Billion Row Challenge and think about how your language could be improved to help solve it more efficiently. Or write a compiler or design a window system, which should give ample feedback about the practicality of the language features you have so far.
Another direction you could explore are substructural type systems, for example:
They also make it simpler to implement a library for concurrency.
4
u/amarao_san Aug 07 '26
Look at context in Scala. It's really, really promising. If only they were not jvm tribe...
3
u/Jwosty Aug 08 '26 edited Aug 08 '26
Units of Measure. A sorely slept-on feature from F# that few (none?) have stolen for whatever reason.
1
u/LowDifficulty5021 Aug 12 '26
One feature I rarely see discussed, but that consistently improves the language experience, is deferred execution (like Go's
deferor Zig'sdefer/errdefer).Since Pie is interpreted, this should fit well with the runtime model. It makes resource management much cleaner:
It also helps with locks, temporary state changes, timers, etc., without needing RAII or exceptions.
Another interesting direction is extension methods, allowing users to add methods to existing types without modifying their definitions:
Beyond that, I'd focus more on polishing than adding features. A small, coherent language with excellent tooling, diagnostics, and documentation is usually more enjoyable than one with every feature imaginable.
4
u/[deleted] Aug 07 '26
[removed] — view removed comment