[erlang-questions] LFE - Lisp Flavoured Erlang released

Robert Virding rvirding@REDACTED
Mon Mar 3 21:20:30 CET 2008

On 03/03/2008, Yariv Sadan <yarivsadan@REDACTED> wrote:
> Robert, this is very cool. I already started playing with LFE and it's
> great. Thanks a lot for sharing it.
> I have a couple of suggestions:
> - it would be nice to have a preprocessor/parse transform that converts
> the form
> (foo:bar baz ..)
> to
> (: foo bar baz ...)
> I find the former much more readable.

Yes, it is easier to read but as yet I don't have any infix operators, and :
is just a normal symbol character so foo:bar is a normal symbol. I have so
far tried to avoid making any characters but the bare minimum needed for
sexps as "special", it keeps the parsing easier. It would be possible to fix
this in the macro expander if enough people complain. :-)

I have not really planned to add an explicit parse transform operation as in
vanilla Erlang as it is "so easy" (TM) to do it yourself.

- It would like to have an Erlang-style '=' operator for binding
> instead of (let). The main difference is in the number of parentheses
> and the scoping rules. So, instead of
> (let ((a 1) (b 2)) (+ a b))
> you could write
> (= (a 1) (b 2))
> (+ a b)

No, one thing I definitely want is variable scoping. I think that was a
definite mistake in vanilla Erlang. 20/20 hindsight.

- String literals should be interpreted as literal lists rather than
> sexps. It seems redundant to write a single quote before a string
> literal.

The problem is that string literals are parsed into lists, strings don't
exist. Seeing their is no abstract syntax I can't tag these as any different
from other literal lists as is done in vanilla and the compiler/interpreter
just sees lists. So they have to be quoted. I agree though that it is not
beautiful. Perhaps all integers in the function position could just be a
function which evaluates to a list of itself and all the arguments. I am
probably joking.

- It would be great to have syntax for multi-line strings and binaries.

Same problem here with string literals within binaries. The syntax can be
modified later when requests stabilise.

- Distributing LFE under a standard open source license would
> encourage its adoption and foster community contributions.
> lfe_scan.erl has this license notice:
> %%% (C)Robert Virding. This stuff is mine, distributed without
> %%% warranty "as is" and may not be used commercially without letting
> %%% me know.
> This wording is ambiguous. Is the only requirement to using LFE
> commercially to let you know, or it it required to buy a license for
> commercial use? What happens to user contributions? Etc.

That only applies to Leex and I know I have to do something with Leex. What
I mean is that I am just interested in knowing who is using it and for what
and have no intention of selling licenses, except of course if I find that
it is wildly popular and I could make a fortune on it and retire to the
south seas. I.e. no licenses, you can quote that.

As for LFE I am giving it away. If somebody has a nice, short license notice
expressing this then let me know. I would, however, become disappointed if
someone else started selling it. :-)

> Yariv

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080303/b8d9dbac/attachment.htm>

More information about the erlang-questions mailing list