{"action":"created","issue":{"url":"https://api.github.com/repos/AndreVanDelft/scala/issues/78","labels_url":"https://api.github.com/repos/AndreVanDelft/scala/issues/78/labels{/name}","comments_url":"https://api.github.com/repos/AndreVanDelft/scala/issues/78/comments","events_url":"https://api.github.com/repos/AndreVanDelft/scala/issues/78/events","html_url":"https://github.com/AndreVanDelft/scala/issues/78","id":65472126,"number":78,"title":"Braces revisited","user":{"login":"AndreVanDelft","id":3143379,"avatar_url":"https://avatars.githubusercontent.com/u/3143379?v=3","gravatar_id":"","url":"https://api.github.com/users/AndreVanDelft","html_url":"https://github.com/AndreVanDelft","followers_url":"https://api.github.com/users/AndreVanDelft/followers","following_url":"https://api.github.com/users/AndreVanDelft/following{/other_user}","gists_url":"https://api.github.com/users/AndreVanDelft/gists{/gist_id}","starred_url":"https://api.github.com/users/AndreVanDelft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndreVanDelft/subscriptions","organizations_url":"https://api.github.com/users/AndreVanDelft/orgs","repos_url":"https://api.github.com/users/AndreVanDelft/repos","events_url":"https://api.github.com/users/AndreVanDelft/events{/privacy}","received_events_url":"https://api.github.com/users/AndreVanDelft/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/AndreVanDelft/scala/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-03-31T15:01:19Z","updated_at":"2015-06-13T15:43:34Z","closed_at":null,"body":"Currently there are several types of brace pairs that separate the process part in scripts from Scala code. Normal braces for normal atomic actions, and braces with immediately next to them one of these symbols: `* ? ! . ...`.\r\n\r\nI wanted to make it more difficult to specify normal atomic actions, for these are rather CPU expensive, so I thought these should be specified using `{! ... !}`. These are now in use for tiny code fragments, and I thought those could use the plain braces instead.\r\n\r\nAnyway, braces for tiny code fragments should also become less needed: method calls as tiny code may also use the plain script call syntax, and assignments could use the `let` construct (work in progress).\r\nBTW currently a method-with-script-call-syntax yields a normal atomic action; this should become a tiny code fragment.\r\n\r\nBut now I think tiny code fragments should be within `{: ... :}`; every kind of code fragment would then have  - no kind would be the default. The main reason for this proposal is that braces would have a use to mark Scala statements (resulting in a value) that would get an implicit conversion.\r\n\r\nA use case is the data store proxy sample application. Its `live` script would be:\r\n```\r\nlive = << req: InformationRequest ==> {dataStore ? req} \r\n                     ~~(data:Data)~~> {dataStore ? DetailsRequest(data)}\r\n               ~~(details:Details)~~> {!  sender  ! (data, details) !}\r\n       >> \r\n```\r\n`{dataStore ? req}` etc. yield futures, which require implicit conversions to scripts.\r\n\r\nBTW I had in mind to write a different kind of brace pair: `{=dataStore ? req=}` but this does not really appeal to me."},"comment":{"url":"https://api.github.com/repos/AndreVanDelft/scala/issues/comments/111722781","html_url":"https://github.com/AndreVanDelft/scala/issues/78#issuecomment-111722781","issue_url":"https://api.github.com/repos/AndreVanDelft/scala/issues/78","id":111722781,"user":{"login":"anatoliykmetyuk","id":2614813,"avatar_url":"https://avatars.githubusercontent.com/u/2614813?v=3","gravatar_id":"","url":"https://api.github.com/users/anatoliykmetyuk","html_url":"https://github.com/anatoliykmetyuk","followers_url":"https://api.github.com/users/anatoliykmetyuk/followers","following_url":"https://api.github.com/users/anatoliykmetyuk/following{/other_user}","gists_url":"https://api.github.com/users/anatoliykmetyuk/gists{/gist_id}","starred_url":"https://api.github.com/users/anatoliykmetyuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anatoliykmetyuk/subscriptions","organizations_url":"https://api.github.com/users/anatoliykmetyuk/orgs","repos_url":"https://api.github.com/users/anatoliykmetyuk/repos","events_url":"https://api.github.com/users/anatoliykmetyuk/events{/privacy}","received_events_url":"https://api.github.com/users/anatoliykmetyuk/received_events","type":"User","site_admin":false},"created_at":"2015-06-13T15:43:34Z","updated_at":"2015-06-13T15:43:34Z","body":"I don't think we should replace `()` by `[]` as a scope delimiter. `()` as a scope delimiter is intuitive, it is used like this everywhere. If we replace it, this will create a barrier for the users.\r\n\r\nParser can differentiate between `(foo, bar)` as a tuple and `(foo)` as a value expression: if it sees the commas, it is a tuple, otherwise - an expression."}}