[erlang-questions] Recless

Ulf Wiger ulf@REDACTED
Wed Oct 11 23:57:30 CEST 2006


Den 2006-10-11 23:32:50 skrev Yariv Sadan <yarivvv@REDACTED>:

> Hi,
>
> I created an experimental parse transform that uses type inference to
> simplify record access and manipulation syntax. For example, it lets
> you write this:
>
>    NewProject = Project.owner.address.city = 'Boston'.
>
> instead of this:
>
>    NewProject =
>        Project#project{owner =
>         (Project#project.owner)#person{address =
>           ((Project#project.owner)#person.address)#address{city =
>             'Boston'}}}.
>
> Recless is about 75% finished, but before I sink any more time into
> it, I would like to ask the Erlang community members for their
> feedback. Is this something you want? Do you see any substantial
> dangers for conflict with the standard Erlang syntax?

I thought that this example:

   NewProject = Project.owner.address.city = "Boston".

clashes with existing syntax. How about:

   NewProject = Project.owner.address{city = "Boston"}

Because you can perfectly well do this today:

X = Y = 17

which binds both X and Y to 17.

You may also want to think about how it clashes with packages
(if it does - I can't come up with an example at the moment.)

Otherwise, I like the idea.

BR,
Ulf W
-- 
Ulf Wiger




More information about the erlang-questions mailing list