[erlang-questions] comma-less lists and tuples

Vlad Dumitrescu vladdu55@REDACTED
Thu Sep 21 08:56:43 CEST 2006


On 9/21/06, Richard A. O'Keefe <ok@REDACTED> wrote:
> By *far* the most readable and writable way to write SQL queries
> in Erlang would be something like
>
>    @sql[ select foo, bar, baz
>          from table1, table1
>          where xyz = 1+2+3+4   ]

/snip/

Hey, this is exactly what I suggested a while ago and what I am
working on (but it's not going forward as fast as I'd want)  :-) Well,
with a different syntax...

I was preparing something for the EUC, but since I won't be able to
attend I will make available my thoughts on the matter of
metaprogramming in Erlang so that everybody can provide input. I feel
there's a lot of potential here.

>>        What do you think? Am I missing something?
> Generality.

To put it another way, putting an Erlang syntax around sql statements
(*) is just a way to make the programmer write extra code in order to
make things easier for the compiler. Things should go the other way
around, don't they?

(*) especially if it's basically the same statement, but with added {}
and commas and with some parts enclosed in single quotes

best regards,
Vlad



More information about the erlang-questions mailing list