r/Compilers • • 16h ago

Releasing The Yugo Programming Language and Skopjemu Emulator

https://serjective.org/blog/releasing-yugo-and-skopjemu/
0 Upvotes

3 comments sorted by

6

u/Inconstant_Moo 13h ago

So on the one hand you claim to have "a smaller, lighter alternative" to C++ and "a focused, understandable design", and that you've been "rejecting [abstractions] that cause more trouble then they’re worth", and that you're all about "human ergonomics" and "language constructs designed to support the programmer while not overcomplicating the language".

But on the other hand you tell me that "While other languages go all in on one approach, Yugo focuses on allowing the programmer to choose and intermix memory management strategies most applicable for their projects".

And then your example "Hello world" code involves putting annotations on structs and then reading them at runtime with some sort of funky macro-looking stuff where all the function names start with #.

Looking at the language reference I find that you have two ways of saying if. The other one's called guard but I didn't understand the difference.

This is your explanation of something seemingly as simple as string interpolation.

Interpolation and owned text#

"Height: (height)" builds a lazy formatting value, not an allocated string. Import core to construct formatting values and io to print an interpolated literal. io.print_line(value) consumes formatting through core.Format. Interpolated expressions are captured once, left to right, and formatted when a consumer writes the value. Floats print in their shortest round-trip form. Tuples, arrays, Optional, and Result format structurally when their components do; a struct or enum can explicitly conform to core.Format for derivation.

The text module supplies owned UTF-8 strings and scoped text views. Use its APIs when text must be stored or transformed at runtime. A static string literal, an interpolation, and an owned text.String are different types; they are not implicitly interchangeable.

And here you are "explaining" closures:

An empty read-only literal can become a thin pointer in an explicitly typed pointer context. An existing closure value does not implicitly convert. Explicit erased callback interfaces use any Call, any CallMut, or any CallOnce through supported reference and owner wrappers.

I didn't ask for any of that. If it is in fact a smaller lighter alternative to C++, then that can only be because "smaller than C++" is an incredibly low bar, not because you spent any actual time thinking about how to make things simple for human beings.

I do like the name of the language, though. Yugoslavia was made by forcibly uniting disparate factions that obviously didn't belong together into an ungodly mess that was bound to end in disaster. And now look at you.

2

u/azhder 11h ago

Let me guess, the emulator will be full of observers.