[erlang-questions] LFE - Lisp Flavoured Erlang released

Yariv Sadan yarivsadan@REDACTED
Mon Mar 3 02:44:42 CET 2008


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.

- 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)


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

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

- 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.

Regards,
Yariv


2008/3/1 Robert Virding <rvirding@REDACTED>:
> I have finally released LFE, Lisp Flavoured Erlang, which is a lisp syntax
> front-end to the Erlang compiler. Code produced with it is compatible with
> "normal" Erlang code. The is an LFE-mode for Emacs and the lfe-mode.el file
> is include in the distribution. Most things seem to work but some things
> have not been done yet:
>
>  - The interpreter does handle recursive letrecs, binaries, receive or try.
>  - There is no lisp shell.
> - Documentation!
>
>  Yet. The system will be updated as new features are added. This is the 1st
> release so there is much left to do.
>
> I have include the existing documentation lfe_guide.txt in this mail. There
> are a number of LFE test files and a version of the LFE interpreter written
> in LFE as examples of code. There are also a number of issues which need to
> be decided for the next version and I have included a file lfe_issues.txt
> which describe them in this mail. Both files are in the distribution.
>
> Note that while this this lisp has been inspired by Scheme (one of the
> issues) it is a NOT Scheme, it is Erlang with a lisp syntax and many nice
> lisp features. Not for that matter is it Common Lisp. In fact features of
> the Erlang engine mean that it is actually impossible to implement full
> Scheme of CL. No, they shouldn't be changed or added.
>
> It was quite writing Erlang code in lisp and I could easily consider using a
> lisp syntax for Erlang. I suppose it depends where your preferences lye. It
> was also easy to get into the traditional lisp habit of using long names for
> everything which I personally think is not a Good Thing. Perhaps we should
> do AFE, Arc Flavoured Erlang, instead? Although I think they have gone too
> far and missed what makes programs easy to read.
>
> Macros are very nice, and it is easy to generate LFE code, which is one of
> the benefits of lisp syntax.
>
> LFE also shows that it would probably be possible to write other front-ends
> inspired by other languages, though why anyone should want to I don't know.
> Perhaps back to a real Prolog syntax again.
>
> The system can be found in the "User Contributions" section at trapexit.org,
> http://forum.trapexit.org/viewtopic.php?p=40268#40268.
>
>
> _______________________________________________
>  erlang-questions mailing list
>  erlang-questions@REDACTED
>  http://www.erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list