News for hackers. Stuff that matters.
Re:A statically typed scripting language that transpiles to ... by Brian_K_White on Friday March 25, 2022 @04:54PM (#30806950)
It's possible to express many common features and functions of other languages in sh fairly well, so it's probably possible for a tool like this to output something not too bad.

But even so, I would never expect any transpilation output to be more than technically readable.

The part with the high level meaning is the part the human wrote. That's the entire point of any language.

The output can not be considered source, regardless that it's possible to also write source in that same syntax.

The only reason to even bother with transpiling instead of just requiring the necessary interpreter, is to ship something that the target already supports. It's very very little different than shipping a binary.

The differences are just that a .sh is at least possible to read and hack vs not-possible. Not convenient or good, merely possible vs not-possible. And a .sh is more portable than a binary in that it doesn't care what the cpu or os is.

If you want anything more high level meaningful instead of some 90's web page generator html output, you have to write that yourself. An automated tool cannot reverse engineer some code into an elegant expression of the original intent of that code. In that way a compiler or transpiler is not much different from a decompiler.

Though, I admit there is room for levels. I don't know just how crude this tool's output is, but I know there is a range of what's possible, it does't have to be

Re:A statically typed scripting language that transpiles to ... by catlifeonmars on Saturday March 26, 2022 @01:46PM (#30813787)
Also, source maps a la JavaScript.