HACKER Q&A
📣 behnamoh

Lisp's parentheses are bad but Elixir's `end`s are okay?


Why do people hate Lisp's parentheses so much, but they don't find this abomination a step back:

Example Elixir code:

  defmodule A do
    defmacro __using__(_env) do
      quote do
        defmodule Math do
          def plus_itself(y) do
            y + y
          end
        end
      end
    end
  end

It also happens in Ruby and several other languages. Typing "end" is three key strokes whereas ")" is just one or two, depending on your keyboard configuration.

And IMO multiple "end"s are much uglier than multiple parentheses.


  👤 taylodl Accepted Answer ✓
And in Lisp I can end an expression such as this with:

)))))

which allows you to quickly see the expression has been ended. I think Lisp has had trouble when people attempt to use parenthesis as begin/end markers and put them on separate lines and try to line them up vertically. Don't do that!


👤 m-onz
I like params and end.... I would happily use lisp or elixir... LFE is really cool.

👤 arrowsmith
meh, you get used to it.