RU version is available. Content is displayed in original English for accuracy.
Advertisement
Advertisement
⚡ Community Insights
Discussion Sentiment
67% Positive
Analyzed from 467 words in the discussion.
Trending Topics
#language#natural#hour#vox#programming#languages#example#number#current#minute

Discussion (6 Comments)Read Original on HackerNews
Natural languages are useful in large part because they have ambiguity and semantically fuzzy edges. That's how we get jokes and poetry and implication, among plenty of other things. Not only that, but natural language necessarily evolves over time: a word that may have meant something very specific at one time can come to be associated with things that may not seem related at first. (For example, I recently learned that average, as in the process of dividing a sum among a number of constituents, originates in an obligation of a ship's crew to compensate a merchant for the value of goods lost in transit.)
Meanwhile, the value of programming languages is specifically that they are designed to be un-ambiguous: they are meant to correspond one-to-one from text on the screen to actions in the computer. Nobody wants a programming language that probably corresponds to a particular set of instructions but might correspond to another. (Or, at least, nobody wants this for serious purposes; it definitely sounds fun, in a way.)
So when we unite the two by trying to implement a programming language that "feels like" natural language, we end up obfuscating intent rather than clarifying it: your programmers now have to learn a different, very specific verison of the natural language at hand (e.g., English) that only applies to this specific set of circumstances. They have to learn a bunch of conventions that are phrased in ways that might, to one programmer or another, feel like they mean one thing but actually mean another. It's an endeavor that often seems good to the person (or small group of people) designing it, but these languages frequently are inhibited from widespread adoption due to footguns the designer(s) did not encounter themselves, because, of course, the language is written in their dialect of the language.
Also, on “reads like English”: “while true” doesn’t sound like that to me. Neither does
Example:
That compiles to a static, bounds-checked ELF binary. I also used it to start building a minimal Linux distro in pure Vox: initramfs, shell, and coreutils (https://github.com/TheJostler/voxos).Pre-1.0 and moving fast. GPL-3.0-or-later.
Site: https://vox-lang.dev Repo: https://github.com/Vox-lang/vox