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

preview_player
Показать описание
David and Randy share some of their thoughts on functions, methods, and multiple dispatch in Julia from the perspective as new users coming to Julia from Python.

Learn how Julia's type declarations and multiple dispatch system allow you to redefine functions with different behavior depending on the types of their arguments and explore some of the differences between functions in Julia and functions in Python.

EPISODE CHAPTERS
00:00 — Introduction
00:16 — Return of the return keyword
03:04 — The Julia style guide
07:26 — One-line functions and anonymous functions
12:22 — Methods and multiple dispatch
17:30 — Keyword arguments in Julia functions
21:10 — Julia structs vs. Python classes
25:27 — Goodbye

ABOUT THE SHOW
Talk Julia is a weekly podcast devoted to the Julia programming language. Join hosts David Amos and Randy Davila as we explore Julia news and resources, learn Julia for ourselves, and share our experience and everything that we've learned.



✨ HELP SUPPORT THE SHOW ✨
If you get value from listening to our podcast each week and would like to support us, you can help us out for free by simply telling someone you know to check out our show.

But if you'd like to support us financially then... Wow! Thank you so much 🙏🏼 Here are two ways to do that:

OTHER LINKS

#JuliaProgramming #JuliaLang #JuliaComputing #Julia #LearnJulia
Рекомендации по теме
Комментарии
Автор

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.

eliascarvalho
Автор

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.

PaulA-krnl
Автор

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.

darcynog
Автор

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

beanloaded