-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Remove ethcore::common re-export module #2792
Conversation
Changes Unknown when pulling e21aef4 on no-ethcore-common into * on master*. |
yey. a PR which add 45 lines of code and results in no bugs being fixed, case being tested nor feature being implemented. |
@gavofyork From the wiki: "readable code == verifiable code". Just trying to keep the "our codebase is lovely" statement true. Glob imports are bad for readability/flexibility, but sometimes acceptable. I find that glob exports are very rarely so. |
perhaps we should being listing which language components we plan to use in the preamble of each and every file.
because, as every great C programmer knows, only with a sufficiently large amount of boilerplate at the top of every file can the codebase truly be considered to be "lovely". |
Part of the reason is to encourage new contributors. Once you've attained a certain degree of familiarity with the codebase, you start to get a feel for where things are coming from (although that doesn't really excuse the re-exports of standard library types from our own modules), but I remember the overwhelming feeling when I first started working on parity was less of a "what does this code do?" than a "where the hell does this type come from?" Part of it is to allow the reader to immediately draw connections of what dependencies in the rest of the codebase the piece of code they're looking at presently has. Classifying explicit imports as boilerplate is a bit dismissive of the entire feature of namespaces IMO. The goal is to immediately enable the reader to identify where a type is declared so they can inspect its implementation as well, and to avoid conflicts when writing code. The category of |
I care about as much that 90% of files in the codebase are dependent on
"boilerplate" is defined as "repeated code of little value and substantial footprint". I'd say that covers the incessant |
Agreed. The standard way of handling this is to use a prelude module as |
I've added a prelude module to ethcore-bigint -- now we can |
Part of #1803