>Hmmm, you assume everyone understands that fn means function and that a void function is the same as a procedure.
No, I don't assume that. But I think that that's irrelevant. People didn't know "def" means function in Python or Scala either, but they learn it on the first day and don't have a readability problem with it.
Very basic keywords like "fn" are not the things that make a language unreadable, nor is calling the keyword "fn" instead of "function". Those are memorized in a day or so and you're done with it.
It's other things that make languages unreadable (too many sigils, overloaded operators or keywords in different contexts (C++, Perl), single letter operators (e.g. APL), too low level, too much verbosity, etc.
In any case, whether a person that first encounter a language immediately recognizes what a keyword means is not what makes the language readable. It's how readable it is to its programmers, after they know the language and have written code in it that matters. Familiar != readable.
>Everybody and their grandma can read Pascal and Ada, but abbreviated keywords and magical symbol require foreknowledge.
And almost everybody and their grandma dislike their syntax (especially Ada's), and would prefer something less verbose.
>And the more abbreviated, the more you will have to continuously look up things in the reference manual until they get cemented.
It's after such basics "get cemented" that readability comes into play, not before. If someone has to look after 2-3 days with the language what "fn" means or how to declare a function (and similarly, "def" in Python/Scala, etc), they have some serious memory issues.
(Btw, Rust, Clojure, and others also use "fn").
>Not sure what you mean here - discriminant unions? classes?
Yes, aka variant, aka tagged union, aka sum type...
> overloaded operators or keywords in different contexts (C++, Perl)
Woa there, ever look at vector math libraries in C - horribly unreadable and ugly.
> too much verbosity
Verbosity describes a programs behavior without implied knowledge thus a reader of some code will understand exactly what is meant. I disagree that the definition of readability is all about how quickly you can skim source code - and ew too many words.
> And almost everybody and their grandma dislike their syntax (especially Ada's), and would prefer something less verbose.
Well, they were objectively designed to readability based on studies of other languages (at least Ada). And hey, I like it but I guess I am biased : P
>Verbosity describes a programs behavior without implied knowledge thus a reader of some code will understand exactly what is meant.
Readability is not just about "understanding what is meant if you take the time". It's also about each piece of code being easy to scan and understand to find what you need. Devs have to scan whole projects to find what happens where, and there's a balance between cryptic very succinct statements and getting lost in expanded verbosity.
Verbosity hurts that by making less code fit on your screen, the code having more stuff that's needed to convey the meaning, etc. You get lost in the extra details, and have more baggage to keep in mind.
It's the difference between saying, e.g.: "Yeah", and "I am indeed craving something savory with lots of melted curdled milk and processed pork cuts, and I believe that we can immediately proceed with the thing that we were just now discussing to do".
Which is one is the more "readable" answer to "Wanna go for a pizza?".
Very well said. This is very much what I am after. Some common idioms in Rust or C++ just feel unnecessarily verbose to me (e.g., `<exp>.unwrap().borrow_mut()`), and I am looking for straightforward ways, often borrowed from other languages, to express the same intent more succinctly and clearly.
No, I don't assume that. But I think that that's irrelevant. People didn't know "def" means function in Python or Scala either, but they learn it on the first day and don't have a readability problem with it.
Very basic keywords like "fn" are not the things that make a language unreadable, nor is calling the keyword "fn" instead of "function". Those are memorized in a day or so and you're done with it.
It's other things that make languages unreadable (too many sigils, overloaded operators or keywords in different contexts (C++, Perl), single letter operators (e.g. APL), too low level, too much verbosity, etc.
In any case, whether a person that first encounter a language immediately recognizes what a keyword means is not what makes the language readable. It's how readable it is to its programmers, after they know the language and have written code in it that matters. Familiar != readable.
>Everybody and their grandma can read Pascal and Ada, but abbreviated keywords and magical symbol require foreknowledge.
And almost everybody and their grandma dislike their syntax (especially Ada's), and would prefer something less verbose.
>And the more abbreviated, the more you will have to continuously look up things in the reference manual until they get cemented.
It's after such basics "get cemented" that readability comes into play, not before. If someone has to look after 2-3 days with the language what "fn" means or how to declare a function (and similarly, "def" in Python/Scala, etc), they have some serious memory issues.
(Btw, Rust, Clojure, and others also use "fn").
>Not sure what you mean here - discriminant unions? classes?
Yes, aka variant, aka tagged union, aka sum type...