-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Helpers\helper] Refactor helper.nim #1273
[Helpers\helper] Refactor helper.nim #1273
Conversation
* avoids unnecessarily nesting code
* avoids unnecessarily nesting code
* improves the readability and avoids ambiguity
* newBlock isn't copying elements one by one, but doing a shallow copy, so no big problems here
* avoids code repetition and unnecessary nesting
@drkameleon I have two questions to do.
|
@drkameleon, the error it's emitting is this: IDK if this is related to any modification on |
|
Hmm... it doesn't seem like it's related at all - to me, it looks like one of the various leftover bugs with the Quantity implementation (unfortunately). I'll have to go through them one by one, I guess it could be my very next PR ;) |
this pattern is the best nim way to have a default return and other ones
reason: a lot of functions using objName and objValue
* replace ugly manual while by range
@drkameleon finished! If you think I should do more things here, you can tell me! |
P.S. I haven't forgotten about this. I just want to take my time and look into properly before merging (and given the amount of work that I've had lately, well... I guess I decided to wait a tiny bit so that I don't do it in a hurry). But I will ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After... almost 2 months, I finally got around to have a look into it lol.
Well, the truth is it's totally looking good (if I spot anything I don't particularly like, I'll look into it at a different moment too, but I really doubt it).
Very organized and clean! 😉
Ready to merge! 🚀 |
Description
This PR cleans
helper.nim
up and refactor some functions, making them more readable and maintainable.Type of change