Remix.run Logo
tombert 3 days ago

You said it before I did; wasn't this the basic point of COBOL? TO make something that more naturally read like English but could be executed.

It's a cute idea, though I think the consensus is that once you actually learn a programming language, it generally doesn't help to have it look like prose.

anonymous908213 3 days ago | parent [-]

I wouldn't be so sure of that consensus, given that C# and Python exist and are generally well-regarded by their users. Clearly there are varying degrees to it, and taking the idea to its logical extreme is not by necessity going to produce the best result, but there's certainly merit to the idea of code that can be read more naturally.

And I think that is really the point of syntax sugar: reading code, not writing code. It seems like a misconception about syntax sugar is that its primary purpose is to make code easier for beginners to learn to write. But I would contend that the real purpose is to make code easier for even experienced programmers to read at a glance, because reading code is actually far more important than writing it.

...granted a certain subsection of the population has determined that reading code is for chumps and boast about how quickly they can use a tool to write lines of code they haven't even read, and that this is the future of software development. Despite their boasts I have yet to see any software I would actually want to use that was written in this manner, though.

wtetzner 3 days ago | parent [-]

I don't think C# and Python are particularly close to natural language. I also don't think making a language read more like English really makes it more readable. If that was true people wouldn't struggle with reading legalese.

anonymous908213 3 days ago | parent [-]

You can absolutely write C# that reads close to natural language. I do so on a daily basis.

Legalese is a bit of a non-sequitur. Despite English legalese ostenisbly being written in English, it is specifically obfuscated, using terminology that is not encountered in everyday English so as to be more difficult for laymen to understand. In fact it is common for legalese to use English that is not English, that is, words that look like English words but have completely different definitions that are not in accord with how those words are used in regular communication.

voidUpdate 2 days ago | parent [-]

I use a lot more brackets in C# than I would in natural language...

anonymous908213 2 days ago | parent [-]

And the original submission billed as "Compile English to Rust" uses a lot more ## and quotation marks than natural language. Perhaps we could establish an understanding that we are still talking about programming languages, not natural language, and that there is a scale of "further from natural language" and "closer to natural language", wherein decisions made about and within the programming language can move it along the scale while still being a programming language.