{"action":"created","issue":{"url":"https://api.github.com/repos/mlmorg/react-hyperscript/issues/40","repository_url":"https://api.github.com/repos/mlmorg/react-hyperscript","labels_url":"https://api.github.com/repos/mlmorg/react-hyperscript/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/mlmorg/react-hyperscript/issues/40/comments","events_url":"https://api.github.com/repos/mlmorg/react-hyperscript/issues/40/events","html_url":"https://github.com/mlmorg/react-hyperscript/issues/40","id":300193766,"number":40,"title":"Some questions regarding syntax and performance","user":{"login":"mcjazzyfunky","id":17143038,"avatar_url":"https://avatars2.githubusercontent.com/u/17143038?v=4","gravatar_id":"","url":"https://api.github.com/users/mcjazzyfunky","html_url":"https://github.com/mcjazzyfunky","followers_url":"https://api.github.com/users/mcjazzyfunky/followers","following_url":"https://api.github.com/users/mcjazzyfunky/following{/other_user}","gists_url":"https://api.github.com/users/mcjazzyfunky/gists{/gist_id}","starred_url":"https://api.github.com/users/mcjazzyfunky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcjazzyfunky/subscriptions","organizations_url":"https://api.github.com/users/mcjazzyfunky/orgs","repos_url":"https://api.github.com/users/mcjazzyfunky/repos","events_url":"https://api.github.com/users/mcjazzyfunky/events{/privacy}","received_events_url":"https://api.github.com/users/mcjazzyfunky/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-26T10:59:58Z","updated_at":"2018-02-26T12:09:17Z","closed_at":null,"author_association":"NONE","body":"No bug, no feature request - just some questions :-)\r\n\r\nFirst, thanks a lot to the whole \"react-hyperscript\" team for providing such a nice alternative to JSX.\r\n\r\nPlease allow me to ask some \"why-questions\" about \"react-hyperscript\" (people sometime consider \"why-questions\" as a bit unfriendly - hope you do not mind my curiosity and my frank questions):\r\n\r\n1.) Regex parsing is costly. JSX does not have to do any Regex parsing. \"react-hyperscript\" uses regexs, but does not do any caching of the regex parsing results, which would speed up everything tremendously. Is there a special reason why \"react-hyperscript\" is going without caching?\r\n\r\n2.) Any hyperscript solution (even if aggressively optimized) will by nature always be slower than using JSX/createElement directly. As \"react-hyperscript\" goes without aggressive optimizations it's normally several times slower than JSX (in one stupid simple test of mine on Firefox it was even more than 10 times slower - but be aware that even \"createElement\" itself is fast with e.g. Chorme and slow with any Microsoft browser). Do you have any experiences whether that performance loss could cause some problems in special scenarios (for example on highly frequented SSR view servers or on very slow smartphone etc.) or is that no issue at all in your opinion?\r\n\r\n3.) About the syntax: \"react-hyperscript\" forces children to be passed as array and not as varargs. This means a litte bit of additional syntactical noise: \"[\" and \"]\" plus some white-space/line-feeds.\r\nIs it for a matter of taste that you prefer the following syntax a) to b) or are there also some other reasons besides taste?\r\n\r\na)\r\n```javascript\r\nh('div.example', [\r\n  h('h1#heading', 'This is hyperscript'),\r\n  h('h2', 'creating React.js markup'),\r\n  h(AnotherComponent, {foo: 'bar'}, [\r\n    h('li', [\r\n      h('a', {href: 'http://whatever.com'}, 'One list item')\r\n    ]),\r\n    h('li', 'Another list item')\r\n  ])\r\n])\r\n```\r\nb)\r\n```javascript\r\nh('div.example',\r\n    h('h1#heading', 'This is hyperscript'),\r\n    h('h2', 'creating React.js markup'),\r\n    h(AnotherComponent, {foo: 'bar'},\r\n        h('li',\r\n            h('a', {href: 'http://whatever.com'}, 'One list item')),\r\n        h('li', 'Another list item')))\r\n```\r\n\r\nThank you very much in advance for your answers."},"comment":{"url":"https://api.github.com/repos/mlmorg/react-hyperscript/issues/comments/368480376","html_url":"https://github.com/mlmorg/react-hyperscript/issues/40#issuecomment-368480376","issue_url":"https://api.github.com/repos/mlmorg/react-hyperscript/issues/40","id":368480376,"user":{"login":"mcjazzyfunky","id":17143038,"avatar_url":"https://avatars2.githubusercontent.com/u/17143038?v=4","gravatar_id":"","url":"https://api.github.com/users/mcjazzyfunky","html_url":"https://github.com/mcjazzyfunky","followers_url":"https://api.github.com/users/mcjazzyfunky/followers","following_url":"https://api.github.com/users/mcjazzyfunky/following{/other_user}","gists_url":"https://api.github.com/users/mcjazzyfunky/gists{/gist_id}","starred_url":"https://api.github.com/users/mcjazzyfunky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcjazzyfunky/subscriptions","organizations_url":"https://api.github.com/users/mcjazzyfunky/orgs","repos_url":"https://api.github.com/users/mcjazzyfunky/repos","events_url":"https://api.github.com/users/mcjazzyfunky/events{/privacy}","received_events_url":"https://api.github.com/users/mcjazzyfunky/received_events","type":"User","site_admin":false},"created_at":"2018-02-26T12:09:17Z","updated_at":"2018-02-26T12:09:17Z","author_association":"NONE","body":"Oh and BTW: I've read issue #7 which has some discussion about the children syntax  ... but my syntax question above does not really find an answer there."}}
{"actor":{"display_login":"mcjazzyfunky"}}