Closed staltz closed 3 years ago
@mixmix Could you check this one?
I don't see the else if as an improvement, but won't block this.
I mainly like the horizontal alignment of all the clauses and the lack of vertical spread (this adds 20 lines?)
If this started with If (false) If else (x) return... If else (y) return...
Then it would be aligned. Dunno if linter let's you collapse those blocks into single line though
Basically this PR feels like minor safety improvement vs minor readability improvement (for some). Ie bikeshed!
Let's keep moving
I don't see the else if as an improvement, but won't block this.
I think it's more about keeping the else if pattern that was there in ssb-bfe originally
Context: in PR #22, arj asked to bring back the
else if
pattern.The first commit formats the encoder / decoder object so that:
sigilSuffix
,string
,bool
,nil
,bytes
to reflect the order in bfe.jsonThe second commit does the else-if refactor