Skip to content
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

TO ADD #2

Open
rigelrozanski opened this issue Nov 29, 2018 · 3 comments
Open

TO ADD #2

rigelrozanski opened this issue Nov 29, 2018 · 3 comments

Comments

@rigelrozanski
Copy link
Owner

I find block variable definitions within functions confusing/unnecessary because it increases indentation which is typically used to signal a logic pathway, additionally it adds extra two extra lines. - let's revert this, or even better move all the variables to their latest line possible, closest to the variables use (I bet you some of these can be defined in place (:=) ) - just looking at the code, this is already the case for name

@rigelrozanski
Copy link
Owner Author

But yeah, I mean I'm kinda a formatting totalitarian, and think that we should come to consensus on a common set of formatting standards (through reason and rationality - I think we can transcend preference here) and apply it uniformly throughout the SDK - I've outlined my formatting thesis in this case, and plan to keep on developing my thinking around code aesthetics and voicing it - once sufficiently developed it should be explicitly included as linting checks I believe.

@rigelrozanski
Copy link
Owner Author

The general consensus from conversations is to always include a return argument at each return statement, and, whenever necessary also include an output field. Examples where this might be necessary would be: a string output where the string actually represents something more detailed such as a key; or some raw.json which represents a specific object; etc. Here we are not gaining any additional valuable information by simply labelling the error as err it's already obvious what error is.

@rigelrozanski
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant