Skip to content

Conversation

@jbytecode
Copy link

@jbytecode jbytecode commented Sep 18, 2023

Hi all, thank you for developing such a library, indeed I used and I love it.

Here is my effort for a more canonical Julia codebase.

This pull request includes some changes in these categories:

  • Unchanged identifiers are defined as const.
  • == nothing conditions changed to isnothing()
  • == 0 conditions changed to iszero()
  • Unused variables in for loops are replaced with underscore, e.g., for _ in iterator.
  • The function definition function newline_to_spaces(string, terminal_width) is changed to function newline_to_spaces(st, terminal_width) just because string is a valid identifier of a function. This might cause confusion.
  • =="" type conditions replaced by isempty()
  • update() function renamed to update!() because it mutates its input.
  • Formatted the whole code using Julia Formatter

All the tests are passed and it seems the changes don't affect the output but the code is more canonical with the new changes (and possibly a little bit faster with a more type stable code, const etc.).

Please do not hesitate to ignore my changes if it does not fit your needs.

Thank you in advance.

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

Successfully merging this pull request may close these issues.

1 participant