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

Coding style #100

Closed
oxygen opened this issue Jan 11, 2015 · 2 comments
Closed

Coding style #100

oxygen opened this issue Jan 11, 2015 · 2 comments

Comments

@oxygen
Copy link

oxygen commented Jan 11, 2015

You are a book author, yet your coding style is lacking at least about new lines after each and every one line if.

For example:
if (argc == 1) return runRepl(vm);

It looks as if you trying to save lines of code.
No offence, this is a bad habbit which produces nothing. Not even readability, on the contrary.

:)

@kmarekspartz
Copy link
Contributor

There is a consistent style for that. If there is no else clause and the consequent is a single line, use no newline. I find this more readable than the return runRelpl(vm) if (argc == 1) style Ruby has.

Please avoid ad hominem attacks.

See: #96 (comment)

@munificent
Copy link
Member

Yes, like @zeckalpha said, one-line if statements are OK.

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

3 participants