{"action":"created","issue":{"url":"https://api.github.com/repos/HaxeFoundation/haxe-evolution/issues/25","repository_url":"https://api.github.com/repos/HaxeFoundation/haxe-evolution","labels_url":"https://api.github.com/repos/HaxeFoundation/haxe-evolution/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/HaxeFoundation/haxe-evolution/issues/25/comments","events_url":"https://api.github.com/repos/HaxeFoundation/haxe-evolution/issues/25/events","html_url":"https://github.com/HaxeFoundation/haxe-evolution/pull/25","id":248109409,"number":25,"title":"Support for code blocks","user":{"login":"mrcdk","id":483531,"avatar_url":"https://avatars3.githubusercontent.com/u/483531?v=4","gravatar_id":"","url":"https://api.github.com/users/mrcdk","html_url":"https://github.com/mrcdk","followers_url":"https://api.github.com/users/mrcdk/followers","following_url":"https://api.github.com/users/mrcdk/following{/other_user}","gists_url":"https://api.github.com/users/mrcdk/gists{/gist_id}","starred_url":"https://api.github.com/users/mrcdk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrcdk/subscriptions","organizations_url":"https://api.github.com/users/mrcdk/orgs","repos_url":"https://api.github.com/users/mrcdk/repos","events_url":"https://api.github.com/users/mrcdk/events{/privacy}","received_events_url":"https://api.github.com/users/mrcdk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-08-04T20:28:54Z","updated_at":"2017-08-06T21:36:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/HaxeFoundation/haxe-evolution/pulls/25","html_url":"https://github.com/HaxeFoundation/haxe-evolution/pull/25","diff_url":"https://github.com/HaxeFoundation/haxe-evolution/pull/25.diff","patch_url":"https://github.com/HaxeFoundation/haxe-evolution/pull/25.patch"},"body":"I'm not happy with the naming of this feature but I hope we can discuss it here.\r\n\r\nRendered version [here](https://github.com/mrcdk/haxe-evolution/blob/code-blocks/proposals/0000-Code-blocks.md)"},"comment":{"url":"https://api.github.com/repos/HaxeFoundation/haxe-evolution/issues/comments/320534418","html_url":"https://github.com/HaxeFoundation/haxe-evolution/pull/25#issuecomment-320534418","issue_url":"https://api.github.com/repos/HaxeFoundation/haxe-evolution/issues/25","id":320534418,"user":{"login":"back2dos","id":509501,"avatar_url":"https://avatars3.githubusercontent.com/u/509501?v=4","gravatar_id":"","url":"https://api.github.com/users/back2dos","html_url":"https://github.com/back2dos","followers_url":"https://api.github.com/users/back2dos/followers","following_url":"https://api.github.com/users/back2dos/following{/other_user}","gists_url":"https://api.github.com/users/back2dos/gists{/gist_id}","starred_url":"https://api.github.com/users/back2dos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/back2dos/subscriptions","organizations_url":"https://api.github.com/users/back2dos/orgs","repos_url":"https://api.github.com/users/back2dos/repos","events_url":"https://api.github.com/users/back2dos/events{/privacy}","received_events_url":"https://api.github.com/users/back2dos/received_events","type":"User","site_admin":false},"created_at":"2017-08-06T21:36:04Z","updated_at":"2017-08-06T21:36:04Z","body":"I agree with @Pauan that the interpretation of syntax should be driven by the normal *scoped* identifier resolution rules, rather than global identifiers. You can still use `import.hx` to apply it to a whole code base.\r\n\r\nThe main issue I see with the proposed syntax is that it can't be nested in itself, which is to some extent what Nicolas is getting at with his comments on delimiters having to be espaced. The simplest example of why it goes wrong: \r\n\r\n```\r\njsx`<ul>${names.map(name -> jsx`<li>{name}</li>`}</ul>`;\r\n```\r\n\r\nWill fail with \"unexpected <\" after:\r\n\r\n```\r\njsx`<ul>${names.map(name -> jsx`\r\n```\r\n\r\n(it will do this whether you use one back tick or three or 42 or whatever)\r\n\r\nAs mentioned on twitter, I've been cooking up [a little something](https://github.com/HaxeFoundation/haxe-evolution/pull/26). You'll find that approach not to exhibit the aforementioned limitations (I'm sure it has its own ones - feel free to comment on them there). We've had [some discussions](https://gist.github.com/back2dos/03da5d2819e8124cb55df9cdee0d1c41#gistcomment-2117730) about it so far, in particular about making a reentrant JSX parser, and why this will become perfectly valid Haxe syntax:\r\n\r\n```haxe\r\n<ul>{names.map(name -> <li>{name}</li>)}</ul>\r\n```\r\n\r\nIn conjunction with https://github.com/HaxeFoundation/haxe/issues/6479 parsing the above becomes a relatively straight forward endeavor - the remaining challenge is parsing a suitable dialect of XML and generating some expressions from this."}}
{"actor":{"display_login":"back2dos"}}