Keyword definition pattern
In Julia, you can create an object using the default constructor, which accepts a list of positional arguments for each of the fields defined for the struct. For small objects, this should be simple and straightforward. For larger objects, it becomes confusing because it is hard to remember which argument corresponds to which field without referring to the struct's definition every time we write code to create such objects.
In 1956, George Miller, a psychologist, published research that involved figuring out how many random digits a person could remember at any time, so the Bell System could decide how many numbers to use for the format of a telephone number. He found that most people can only remember five to nine digits ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access