{"action":"created","issue":{"url":"https://api.github.com/repos/jscl-project/jscl/issues/262","repository_url":"https://api.github.com/repos/jscl-project/jscl","labels_url":"https://api.github.com/repos/jscl-project/jscl/issues/262/labels{/name}","comments_url":"https://api.github.com/repos/jscl-project/jscl/issues/262/comments","events_url":"https://api.github.com/repos/jscl-project/jscl/issues/262/events","html_url":"https://github.com/jscl-project/jscl/pull/262","id":190698050,"number":262,"title":"[Experimental] Clojure-like foreign method call syntax","user":{"login":"takagi","id":1224375,"avatar_url":"https://avatars.githubusercontent.com/u/1224375?v=3","gravatar_id":"","url":"https://api.github.com/users/takagi","html_url":"https://github.com/takagi","followers_url":"https://api.github.com/users/takagi/followers","following_url":"https://api.github.com/users/takagi/following{/other_user}","gists_url":"https://api.github.com/users/takagi/gists{/gist_id}","starred_url":"https://api.github.com/users/takagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takagi/subscriptions","organizations_url":"https://api.github.com/users/takagi/orgs","repos_url":"https://api.github.com/users/takagi/repos","events_url":"https://api.github.com/users/takagi/events{/privacy}","received_events_url":"https://api.github.com/users/takagi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-21T12:07:04Z","updated_at":"2016-11-22T14:04:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jscl-project/jscl/pulls/262","html_url":"https://github.com/jscl-project/jscl/pull/262","diff_url":"https://github.com/jscl-project/jscl/pull/262.diff","patch_url":"https://github.com/jscl-project/jscl/pull/262.patch"},"body":"**This PR is not needed to be merged to master.**\r\n\r\nI've experimentally implemented a Clojure-like foreign method call syntax with casual hack.\r\n\r\nCurrently we can call foreign methods in terms of internal `oget` fanction as:\r\n\r\n    ((oget droparea \"on\") \"dragleave\"\r\n      #'(lambda (evt)\r\n          ((oget evt \"stopPropagation\"))\r\n          ((oget evt \"preventDefault\"))\r\n          ((oget droparea \"removeClass\") \"highlight\")))))\r\n\r\nThe introduced syntax enables us code the same thing as:\r\n\r\n    (.on droparea \"dragleave\"\r\n      #'(lambda (evt)\r\n          (.stopPropagation evt)\r\n          (.preventDefault evt)\r\n          (.removeClass droparea \"highlight\")))))\r\n\r\nwhich, off course there would be things left to be considered, greatly increase the feasibility to employ JSCL in practical web applications.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/jscl-project/jscl/issues/comments/262248284","html_url":"https://github.com/jscl-project/jscl/pull/262#issuecomment-262248284","issue_url":"https://api.github.com/repos/jscl-project/jscl/issues/262","id":262248284,"user":{"login":"fstamour","id":2881922,"avatar_url":"https://avatars.githubusercontent.com/u/2881922?v=3","gravatar_id":"","url":"https://api.github.com/users/fstamour","html_url":"https://github.com/fstamour","followers_url":"https://api.github.com/users/fstamour/followers","following_url":"https://api.github.com/users/fstamour/following{/other_user}","gists_url":"https://api.github.com/users/fstamour/gists{/gist_id}","starred_url":"https://api.github.com/users/fstamour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fstamour/subscriptions","organizations_url":"https://api.github.com/users/fstamour/orgs","repos_url":"https://api.github.com/users/fstamour/repos","events_url":"https://api.github.com/users/fstamour/events{/privacy}","received_events_url":"https://api.github.com/users/fstamour/received_events","type":"User","site_admin":false},"created_at":"2016-11-22T14:04:04Z","updated_at":"2016-11-22T14:04:04Z","body":"What do you think of this syntax:\r\n`((.some-fn) agr1 arg2)` => `someFn(arg1, arg2);`\r\n`((. obj attr1 attr2 fn) arg1 arg2)` => `obj.attr1.attr2.fn(arg1, arg2);`\r\n?"}}
{"actor":{"display_login":"fstamour"}}