News for hackers. Stuff that matters.
Re:Elixir vs. Erlang: a question of momentum by yellowapple on Thursday April 23, 2015 @03:45PM (#9429323)
Some Ruby (and Elixir and Julia and other languages that use `end`) will just add a comment at the end of the `end` if they want to be more explicit about it. For example:

    def foo(bar,baz) do
      ...
    end # foo
This brings me to why a bare `end` makes more sense (in the case of Elixir, at least): because every use of `end` corresponds to a `do`. The above code is basically equivalent to `def foo(bar,baz) { ... }`, since `def` takes a function specifier and a block as its arguments.

If you really don't like `end`, you can also (at least with Elixir) use the shorthand form:

    def foo(bar,baz), do: ...

There are no comments on this comment yet.