4 ms·
Let me see... instead of having to capitalize every single usage of a given symbol, I can just prefix it's defintion once with `pub`? Yeap, I rather do that. In
by dpc_pw 10y ago
Let me see... instead of having to capitalize every single usage of a given symbol, I can just prefix it's defintion once with `pub`? Yeap, I rather do that. Instead of replacing all instances to lower case, I can just remove the `pub`. It's obviously better.
Rust is noisy in other parts, for other reasons (trying to explain to compiler how to write super fast and data-race free code). But visibility qualifiers are not a problem.
`extern` is only for importing crates, which is like 10 lines at in whole package/crate. Irrelevant.
- garfij 10y agoJust for contrast, when I'm exporting something in Go, using gorename makes it very easy to fix all the references within the package. It works the same when I'm un-exporting something as well. However, when un-exporting I have to go though all other packages that use that identifier and fix the code that used it. Presumably you need to do something similar when you remove the `pub` (i.e. It's not just a simple removing of the pub unless nothing used it to begin with). Ultimately in the end, for this example it really seems like the same amount of work. You add one word, I run one command.