[erlang-questions] Re: Special syntax for dictionaries
Hynek Vychodil
hynek@REDACTED
Wed May 5 15:08:13 CEST 2010
On Wed, May 5, 2010 at 2:17 PM, Tim Fletcher <mail@REDACTED> wrote:
>> While your examples might work if the value is a simple constant or
>> variable allowing any legal general expression will cause problems.
>> How would you interpret <{erlang:list_to_integer("123")}> ? Note that
>> white space is usually ignored so making white space significant here
>> would be creating a special case for just this.
>
> You're right, that's definitely not workable.
>
>> This was the main reason that = is used in the record syntax. While ~
>> may look strange using : will cause problems. How about =? Though this
>> may force you to parenthesize some expressions.
>
> I think = is fine aesthetically, but Richard notes in his frames
> proposal that it could also be confused with existing syntax that uses
> =. Adopting the Ruby style "arrows" would be another option:
>
> <{author=>"Mike", erlang=>list_to_integer("123")}>
>
> Looks clear enough, but might be a bit too verbose for typing out?
Just to be correct it is not Ruby style but Perl style and it was
found brief enough even in Perl sense.
>
> Tim
>
>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
>
>
--
--Hynek (Pichi) Vychodil
Analyze your data in minutes. Share your insights instantly. Thrill
your boss. Be a data hero!
Try GoodData now for free: www.gooddata.com
More information about the erlang-questions
mailing list