[erlang-questions] Any Erlang Devs Contemplating Elixir?

Robert Virding rvirding@REDACTED
Sun Mar 13 23:40:12 CET 2016


Don't forget #m(...) for literal maps and #"..." for utf-8 encoded binary
strings.

Actually they are all well-defined. The #(...), #b(...) #m(...) define data
types based on the CL syntax for vectors #(...). The others are also taken
from standard CL.

If you want to add these datatypes and constructs, which I do, then you are
going to add new syntax however you do it. Also these are all literal
values and not forms. It is the forms being extremely consistent which make
writing macros very simple. It also allows you to generate "new" syntax
which Elixir does not.

Robert


On 7 March 2016 at 15:42, Anthony Ramine <n.oxyde@REDACTED> wrote:

> Homoiconicity is way overrated when it comes to metaprogamming. There is
> nothing that Lisp does with parentheses that Elixir cannot with the 'do'
> token.
>
> And no Lisp is truly simple or consistent. Not LFE at least.
>
> lists:map
> #'list_to_integer/1
> #*0
> #o111
> +1.0
> #B(…)
> #(…)
> ; comments
> #.(…)
>
> There is nothing simple nor consistent about this.
>
> Regards.
>
> Le 6 mars 2016 à 05:13, Robert Virding <rvirding@REDACTED> a écrit :
>
> I think if you seriously want to push macros then LFE, or any other lisp
> for that matter, is a much better option. It is much more straight-forward
> and readable. It also gives you the option of creating new syntax which
> Elixir macros don't. Elixir has a slightly "lax" syntax which allows you to
> hide that everything is a function call but you can't create new syntax.
>
> Of course some people lisp doesn't actually have any syntax but I prefer
> to view it as being very simple and very consistent. :-)
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160313/382dc49c/attachment.htm>


More information about the erlang-questions mailing list