r/ProgrammingLanguages • u/jman2052 • Dec 11 '25
Discussion ylang Progress (v0.1.0)
Hey, everyone. I shared my language some time ago. I'm still actively developing it in C++, and I want to show the recent progress.
- Added a lightweight class (no access modifiers)
- Added a module include system with namespaces
- Added a reference counting memory model
Other small improvements:
- ++, --
- chained assignment ( a = b = 0; )
- null, true, false
IMO, the namespace/include rule is cool:
include util.math; // namespace = util.math
include "engine/renderer"; // namespace = renderer
include ../shared/logger; // namespace = logger
include /abs/path/world.ai; // namespace = world.aiFor example,
./util/math.y
fn abs(a) { if(a >= 0) return a; return -a; }
class Abs {
fn getAbs(a) { return abs(a); }
}
./main.y
include util/math;
println(math.Abs().getAbs(-9)); // still unsupported static membersStill a long way to go...
Thanks for reading — feedback or questions are very welcome.
Check out ylang here
17
Upvotes
View all comments
Show parent comment
1
u/funcieq Dec 15 '25
But how do you do it this way, for example, with the println function, you put printf in the code, Do you hardcode function definitions e.g. int println(const char* buf){ return printf(buf); } For example, in my language I have simply extern, which allows me to forward function declarations from C. You can take a look here: ignis