|
Post by keybounce on Oct 12, 2017 4:44:50 GMT
Does anyone know of a ~ath compiler, or translator to C?
|
|
The One Guy
Rust Maid
Posts: 1,148
Pronouns: he/him/his
|
Post by The One Guy on Oct 12, 2017 17:57:33 GMT
Given that it ~ath is a nonexistent language made up for the story ... and how any efforts turn it into a real language world be impossible due to being based on unknown parameters such as when people will die ... and that even if it were possible it'd be useless as how it's described to work would make it pretty much impossible to actually program something with ... yeah, I'd say it's pretty clear no such compiler exists.
|
|
|
Post by keybounce on Oct 12, 2017 20:48:20 GMT
Maybe I misunderstood something here. ~ath is based on "infinite" loops, actually bound to an object's life. When the object goes away, you do things. That's a destructor in normal OO programming.
Now, Java does not guarantee that an object's destructor will be called, but I thought C++ did.
So you have a destructor-based language with an infinite loop as the primary looping. To break a loop, you have free/release an object to trigger the break into that destructor code.
Put some sort of OS wait at the center -- select(), read(), etc -- and you've got the basics of a usable, if badly designed, language.
|
|
The One Guy
Rust Maid
Posts: 1,148
Pronouns: he/him/his
|
Post by The One Guy on Oct 12, 2017 21:59:22 GMT
Ok, so I went and found where the comic says how the language works and read through what was there. Here's what it has to say: So basically, you make a bunch of loops within loops, and if a loop within a still running loop terminates, it runs some subroutine. I suppose this could make for a usable, if pointless, coding style, if it weren't for four major problems: - The length of the loops are tied to the lifespan of real world objects. I don't think I need to tell you why that's not actually possible.
- Even if 1 was possible, the code would only being able to be run once. For instance, any code set to execute when you die will run whenever you die, and then can never be run again.
- We know absolutely nothing about the code outside of the whole loop thing. What does the code in the subroutines look like? I suppose we could just take what we know and fill in the gaps with an existing language like C++, but since the gaps are basically 99% of the code, we'd just end up with a slightly modified C++, not any sort of new language.
- The way things are explained implies a lack of any sort of loop structure or function calling (or for that matter, any obvious work-arounds such as break or goto) outside of the method we've been shown (otherwise, the inability to connect the loops to the lifespans of short-lived objects would be a non-issue). This mean that every single loop made is based on the life or real world objects. Programmers get no control over how many iterations the loop will have and can't even end loops based on the state of the data being worked with. And with no proper function-calling, recursion isn't a viable alternative. This pretty much cripples the capability of the language; you simply can't make any sort of complex program using only loops like that, even if the code is very capable otherwise. The one defining feature that make ~ath what it is ultimately renders it useless
|
|