Re:Julia Language Co-Creators Win James H. Wilkinson Prize f...
by yellowapple on Wednesday January 23, 2019 @04:48PM
(#18983421)
Are they, though? The relevant functions in Enum all seem to be zero-based, for example:
Not that it really matters anyway. Like with Erlang, in the vast majority of cases where I'd normally reach for querying a list element by index, pattern matching is the better / more idiomatic option. Compare:
with:
Both give you the exact same values of foo/bar/baz/rem, but the latter is arguably more readable and concise, and entirely avoids the 0 v. 1 debate.
[ Parent
| on HN ]
There are no comments on this comment yet.