Functions, Methods, Structs, and Style Guides | Talk Julia #5

Поделиться
HTML-код
  • Опубликовано: 27 окт 2024

Комментарии • 9

  • @eliascarvalho8637
    @eliascarvalho8637 2 года назад +5

    These are some naming conventions that are in the Variables section of the documentation:
    - Names of variables are in lower case.
    - Word separation can be indicated by underscores ('_'), but use of underscores is discouraged unless the name would be hard to read otherwise.
    - Names of Types and Modules begin with a capital letter and word separation is shown with upper camel case instead of underscores.
    - Names of functions and macros are in lower case, without underscores.
    - Functions that write to their arguments have names that end in !. These are sometimes called "mutating" or "in-place" functions because they are intended to produce changes in their arguments after the function is called, not just return a value.

  • @PaulA-kr1nl
    @PaulA-kr1nl 2 года назад +1

    It’s “functional” to skip return from functions as functions need to return values. Nonfunctional style programmers find it odd but then they expect functions to not return values as well. Those are considered side effects that are discouraged in functional style. From that perspective, “return” is superfluous except in conditional construct. Returning values also allow for chaining or piping, which is the reason why Julia packages work very well together.

  • @hugosantaremdearaujo1170
    @hugosantaremdearaujo1170 2 года назад +1

    Another great one!

  • @darcynog
    @darcynog 2 года назад +1

    Is there a book under 400 pages from which an experienced programmer can learn the language? Preferably covering up to the most recent versions. Thanks.

    • @TalkJulia
      @TalkJulia  2 года назад +2

      Honestly, the best resource I (David) have found is this Google Colab notebook written for Python programmers coming to Julia colab.research.google.com/github/ageron/julia_notebooks/blob/master/Julia_for_Pythonistas.ipynb#scrollTo=tQ1r1bbb0yBv
      If you have Python experience, that might help you out.

  • @beanloaded
    @beanloaded 2 года назад +1

    Dark screen is difficult to read. Maybe the font is too small.

    • @TalkJulia
      @TalkJulia  2 года назад +1

      Thanks, we appreciate the feedback. We’ll make sure we the font is much larger in the future.

    • @DrRandyDavila
      @DrRandyDavila 2 года назад +1

      That's completely my fault! Next time I'll be sure to fix this.