I Don't Like Imports

33 points by jo3_l


joshka

Personally, I’ve seen significantly more code where the problem of understandability comes from being overly verbose than code which I can’t understand due to unknown external imports. I’d advise the opposite approach if you want easy to maintain software.

The “it’s too long” argument is a reasonable stopping point that makes me disagree with this advice. The purpose of all abstractions in programming is to make it quick to easily read and understand code. An import is one of these ways. Adding repeated / unnecessary namespaces to every place that names are used makes code more difficult to read easily at scale (as a general rule). As a general rule, verbosity often harms intelligibility.

Some rust specific things I personally like: