[ 
https://issues.apache.org/jira/browse/TAMAYA-345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16614367#comment-16614367
 ] 

William Lieurance commented on TAMAYA-345:
------------------------------------------

I did a quick survey on how various of the most popular current languages 
define maps.  Here's what I found:

* single colons \{"key":"value"}
** javascript/json https://www.w3schools.com/js/js_objects.asp
** groovy http://grails.asia/groovy-map-tutorial
** golang https://blog.golang.org/go-maps-in-action
** python https://docs.python.org/3/tutorial/datastructures.html
** swift https://developer.apple.com/documentation/swift/dictionary

* rocket \{"key" => "value"}
** perl https://perlmaven.com/perl-hashes
** ruby https://ruby-doc.org/core-2.1.1/Hash.html
** php https://www.w3schools.com/php/php_arrays.asp

* singlerocket \{"key" -> "value"}
** scala https://docs.scala-lang.org/overviews/collections/maps.html
 
* comma, basically an array conversion [("key", "value")].somefunction()
** Java, sort of?  It really wants you to call .put(key, value) over and over. 
** Rust https://doc.rust-lang.org/std/collections/struct.HashMap.html
** C# 
[https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/how-to-initialize-a-dictionary-with-a-collection-initializer]

Based on that, I'd recommend going with the single colon.  I've submitted 
https://github.com/apache/incubator-tamaya-sandbox/pull/9 to show what that 
would look like, changing the tests and docs.  Totally willing to hear 
alternative ideas. :-)

> Proposal: Change default key-value separator from :: to = 
> ----------------------------------------------------------
>
>                 Key: TAMAYA-345
>                 URL: https://issues.apache.org/jira/browse/TAMAYA-345
>             Project: Tamaya
>          Issue Type: Wish
>          Components: Sandbox
>    Affects Versions: 0.4-incubating
>            Reporter: Alexander Suter
>            Assignee: Anatole Tresch
>            Priority: Major
>
> I think this more common.
> [https://github.com/apache/incubator-tamaya-sandbox/pull/6]
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to