Sources of misunderstanding

77 views
Skip to first unread message

Andreas Röhler

unread,
Apr 1, 2015, 4:39:06 AM4/1/15
to elixir-l...@googlegroups.com
Hi all,

while Elixir documention in general is well done and a pleasure to read
--thanks all!-- there is an ongoing issue, which makes it more difficult
for beginners as it needs to be.

This could be avoided the very same way as the symbol "foo" is
understood as example-function-name.

Unfortunatly at many cases, where something like "my_var" would be
obvious, symbols are used which are far from that.

Consider for example

elixir-lang.readthedocs.org/en/latest/intro/2/index.html#linked-lists:

iex> list = [1,2,3]
iex> hd(list)

Here "list" might be (mis)-understood as an action, a function, which
may listify.
Bracketed stuff showing up as a list - there is no garantee, its not
self-explaining.

That way it would be much easier to follow:

iex> my_var = [1,2,3]
iex> hd(my_var)

In that case, the type list of my_var would be demonstrated by hd, which
takes a list.

Cheers,

Andreas

Booker Bense

unread,
Apr 1, 2015, 4:31:26 PM4/1/15
to elixir-l...@googlegroups.com
This is just my point of view, but I find your example more confusing, not less. 
I guess when I see list, I just think it means the basic list type. 

- Booker C. Bense
Reply all
Reply to author
Forward
0 new messages