I tend to use ‘this isn’t explicit and explicit is good’, so I feel compelled to explain what I mean by explicit, since it’s not represented in the post. Note, I can’t think of another word which makes my notion more clear.
My notion of implicit vs explicit is mostly influenced by things in C++ which are implicit vs explicit, like coersions and conversions. For example, single argument constructors can be marked as explicit, which means that they aren’t considered in contexts where implicit conversions are allowed but explicit ones are.
So, how does one apply this to Rust?
As an example, constructors in C++ both ‘construct’ and ‘convert’, unless the user types the keyword ‘explicit’ with the declaration. The relevant take away here is that a choice is being made (i.e. to ‘convert’ or not) but the choice is defaulted without the user needing to acknowledge that a choice has been made. Another example is const in method declarations (struct S { void foo() const; };. Note, lambdas are similarly implicit but change the default, so you need [a]() mutable { a = 10; } if you want to capture a by value and then change it (note, this won’t change the original value of a).
So, when I say, ‘this syntax isn’t explicit’, what I really mean is that a choice is being made (because it’s defaulted) and the programmer is not required to type or read something which acknowledges this choice.
So, as an example in Rust, if I type mod s { struct S; }, then S is not public and I may not even know that Rust has a public vs private distinction. In this case, even though this syntax is implicit, it is mostly fine because users will eventually get an error when trying to use S and will learn the syntax anyways.
Rust mostly gets this right and implicit features have defaults which are more restrictive and therefore, users only need to type more and learn more about various choices when they need to.
Anyways, this is the most useful definition of explicit/implicit I’ve encountered, because it allows reasoning about whether code (as read, after the fact) was written to intentionally do something or not.