-
Notifications
You must be signed in to change notification settings - Fork 30
clean up use of unsafePartial #128
clean up use of unsafePartial #128
Conversation
A bit of code cleanup that restricts use of unsafePartial to where it's really needed.
Thanks, but the reason it's been done this way is to ensure that |
I thought |
And even if that weren't the case, I would understand leaving |
I suppose it's possible these are actually equivalent, then. Is there a difference in the generated code? With the code the way it is now, it is at least crystal clear that even if the |
Just FYI, I'm becoming less keen on refactoring changes which don't change behaviour, because I think the maintenance effort (i.e. reviewing, merging, releasing, etc) effort to payoff ratio is quite small compared to other work I could be doing, and also because it makes |
Ah, fair enough. That makes sense. FWIW, the generated code is indeed equivalent. I get what you are saying as regards the change to That said, I understand the hesitation regarding merging of refactoring changes. I was working on some other, more useful changes, of which these were a (tiny) part. Perhaps if those changes make sense, we can include this kind of thing in there. |
Ok, thanks, that's good to know. Re |
Well that's not quite true; I did notice but I failed to consider the implications properly. |
I've amended the branch accordingly. If you think it's worth incorporating the change to |
GitHub won't let me reopen for some reason, would you mind sending a new PR? |
A bit of code cleanup that restricts use of
unsafePartial
to where it's really needed.