I am opening this as a point of discussion to both inform, and talk about some of the upcoming Pull Requests that are in the process of being reviewed in the FRAME department.
The general sentiment of where we are moving toward is: Less magic, more explicit. We have come to this conclusion mainly though the Polkadot Blockchain Academy, realizing that it is extremely difficult to teach parts of FRAME that are being “magically generated” under the hood to new developers. I am personally worried that such difficulties are deterring a lot of developers away (despite reports such as Electric Capital indicating good numbers)
Obviously, education is just one side. Assuming you pass the initial hurdle, having some of this macro-magic will save you some keystrokes.
I personally prefer more explicit code and don’t mind writing a few extra characters here and there. I think the net benefit that having a more explicit FRAME will bring to the ecosystem will easily trump the slight verbosity that comes with it.
Some lines of work related to this:
- https://github.com/paritytech/substrate/pull/13365
- Remove use of trait Store from all pallets and deprecate it. by vivekvpandya · Pull Request #13535 · paritytech/substrate · GitHub
- Make construct_runtime macro more flexible · Issue #232 · paritytech/polkadot-sdk · GitHub
Importantly, we are making sure that only within the scope of the newly introduced
#[pallet::dev_mode]
, certain details are hidden away, for example this.
What do you think about this, and what do you prefer?