patch for better record syntax.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

patch for better record syntax.

YAMASHINA Hio-2

Hi, all.

When we today want to extract a value which lies deep in a complex
object, we have to say like:
``((Data#type1.field1)#type2.field2)#type3.field3''
but it looks ugly.

I suggest more straightforward syntax:
``Data#type1.field1#type2.field2#type3.field3.''

Attached patch implements this.


Regards.

--
YAMASHINA Hio <hio>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: record.patch
Type: application/octet-stream
Size: 635 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20070612/d8c7f1dd/attachment.obj>

Reply | Threaded
Open this post in threaded view
|

patch for better record syntax.

YAMASHINA Hio-2

Hi, all.

In addition to previous,
this one extends another syntax,
``Data#type1.field1#type2{ field2 = value2 }.''


Regards.

On Tue, 12 Jun 2007 18:27:53 +0900
YAMASHINA Hio <hio> wrote:

>
> Hi, all.
>
> When we today want to extract a value which lies deep in a complex
> object, we have to say like:
> ``((Data#type1.field1)#type2.field2)#type3.field3''
> but it looks ugly.
>
> I suggest more straightforward syntax:
> ``Data#type1.field1#type2.field2#type3.field3.''
>
> Attached patch implements this.
>
>
> Regards.
>
> --
> YAMASHINA Hio <hio>
>


--
YAMASHINA Hio <hio>
http://fleur.hio.jp/erlang/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: record2.patch
Type: application/octet-stream
Size: 738 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20070614/3c321bc5/attachment.obj>