Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Well sure but you could be more clear.

Block parameters, implicit parentheses for certain method/function calls, uppercase significance, symbolic significance for brackets.



Elixir doesn't have blocks as a separate concept like Ruby. The "blocks" are just syntax sugar for passing keyword lists of code to macros.

What do you mean by "symbolic significance for brackets?"


I’m not sure the word for it, but brackets only ever mean two things, to my knowledge. Hash or Block, in Ruby.

I spent many years in perl, so I’m of the opinion visual indicators for datatypes are actually a good thing at the point of instantiation/composition.

Not sure how to properly word it


Oh, are all the paren/bracket types interchangeable in Perl? I've never used Perl.

Yea, each set of them ([], (), {}, <>) has a very distinct meaning in Elixir.


Well in perl there’s a concept of sigils.

my @num = (1, 2, 3);

my $num = 25;

say $num[1];

So that last line prints 2, which is obvious by looking at it, but can be difficult in more complex code when you’re overloading names by the way the variable is accessed.

Everything in perl is a rabbit hole of details, as an aside.

Anyhow, I just appreciate that the symbols always mean the same thing. Takes a load off of my brain. Like a single character type annotation, kinda.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: