Why not hardcode values?
See original GitHub issueThe goal is for the contract to be “designed to be as simple as possible”. Wouldn’t it be advantageous to hardcode the ownersArr
and threshold
values instead of specifying them as parameters to the constructor? 🤷♀️
It would make the code even simpler.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Why is hard coding considered bad practice? - Quora
Hard-coded values are a huge bug farm. They breed bugs. There are 3 reasons: 1. Readability/understandability 2. Maintainability 3.
Read more >Why You Should Avoid Hard Coding and Three Alternative ...
A best practice in technology is to not reference IDs or text directly, or “hard code” them. That same best practice applies to...
Read more >Is it ever a good idea to hardcode values into our applications?
tl;dr: Yes, it is sometimes a good idea to hard-code values, but there's no simple rule as to when; it depends completely on...
Read more >What is your attitude towards hard coding? - Stack Overflow
Hard coded values should always be declared on a central places in constants. · Even if a value is hard-coded, it should still...
Read more >Don't hard code values that may change - YouTube
One of the biggest mistakes you can make is to hard code assumptions into your ... Comments at: https://exceljet.net/tips/ dont -hard-c.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
for a sample implementation of this, see https://github.com/etherisc/simplestWallet
@christoph2806 @neuhaus I’m personally feeling like hardcoding values is taking things a bit too far, and I do think it will be harder to formally verify using this. It’s probably more error prone that people have to fiddle with the source code manually in order to hard code these values.