{"action":"created","issue":{"url":"https://api.github.com/repos/yegor256/eo/issues/21","repository_url":"https://api.github.com/repos/yegor256/eo","labels_url":"https://api.github.com/repos/yegor256/eo/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/yegor256/eo/issues/21/comments","events_url":"https://api.github.com/repos/yegor256/eo/issues/21/events","html_url":"https://github.com/yegor256/eo/issues/21","id":189984990,"number":21,"title":"Syntactic sugar for decorating","user":{"login":"MadridianFox","id":3392587,"avatar_url":"https://avatars.githubusercontent.com/u/3392587?v=3","gravatar_id":"","url":"https://api.github.com/users/MadridianFox","html_url":"https://github.com/MadridianFox","followers_url":"https://api.github.com/users/MadridianFox/followers","following_url":"https://api.github.com/users/MadridianFox/following{/other_user}","gists_url":"https://api.github.com/users/MadridianFox/gists{/gist_id}","starred_url":"https://api.github.com/users/MadridianFox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MadridianFox/subscriptions","organizations_url":"https://api.github.com/users/MadridianFox/orgs","repos_url":"https://api.github.com/users/MadridianFox/repos","events_url":"https://api.github.com/users/MadridianFox/events{/privacy}","received_events_url":"https://api.github.com/users/MadridianFox/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-17T09:13:56Z","updated_at":"2016-11-17T12:56:21Z","closed_at":null,"body":"Perhaps this syntax will be more comfortable for wrapping object in many decorators?\r\nDoesn't matter, which type of brackets will be used for grouping decorators. Important only the idea - decorator is an object, which wraps other object of same type and we can simplify our life, when we make object + decorators hierarchy flatter.\r\n```java\r\n// before\r\nsliced(\r\n    upperCased(\r\n        reversed(\r\n            string(\"hello world\")\r\n        )\r\n    )\r\n, 4)\r\n// after\r\nstring(\"hello world\")[\r\n    reversed(),\r\n    upperCased(),\r\n    sliced(4)\r\n]\r\n// and decorator implementation\r\ndecorator sliced for string{\r\n    int len;\r\n    constructor(int len){\r\n        this.len = len;\r\n    }\r\n    // string interface realization\r\n    text(){\r\n        // we can work with wrapped object via this.wrapped\r\n    }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/yegor256/eo/issues/comments/261239904","html_url":"https://github.com/yegor256/eo/issues/21#issuecomment-261239904","issue_url":"https://api.github.com/repos/yegor256/eo/issues/21","id":261239904,"user":{"login":"0x13a","id":9900155,"avatar_url":"https://avatars.githubusercontent.com/u/9900155?v=3","gravatar_id":"","url":"https://api.github.com/users/0x13a","html_url":"https://github.com/0x13a","followers_url":"https://api.github.com/users/0x13a/followers","following_url":"https://api.github.com/users/0x13a/following{/other_user}","gists_url":"https://api.github.com/users/0x13a/gists{/gist_id}","starred_url":"https://api.github.com/users/0x13a/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0x13a/subscriptions","organizations_url":"https://api.github.com/users/0x13a/orgs","repos_url":"https://api.github.com/users/0x13a/repos","events_url":"https://api.github.com/users/0x13a/events{/privacy}","received_events_url":"https://api.github.com/users/0x13a/received_events","type":"User","site_admin":false},"created_at":"2016-11-17T12:56:21Z","updated_at":"2016-11-17T12:56:21Z","body":"this doesn't look anymore as a decorator, seems more like a pipe or chain of responsibility which is not the same thing imho"}}
{"actor":{"display_login":"0x13a"}}