{"action":"created","issue":{"url":"https://api.github.com/repos/stampit-org/stamp-specification/issues/88","repository_url":"https://api.github.com/repos/stampit-org/stamp-specification","labels_url":"https://api.github.com/repos/stampit-org/stamp-specification/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/stampit-org/stamp-specification/issues/88/comments","events_url":"https://api.github.com/repos/stampit-org/stamp-specification/issues/88/events","html_url":"https://github.com/stampit-org/stamp-specification/issues/88","id":155574808,"number":88,"title":"Extending instance with other stamps on fly?","user":{"login":"FredyC","id":1096340,"avatar_url":"https://avatars.githubusercontent.com/u/1096340?v=3","gravatar_id":"","url":"https://api.github.com/users/FredyC","html_url":"https://github.com/FredyC","followers_url":"https://api.github.com/users/FredyC/followers","following_url":"https://api.github.com/users/FredyC/following{/other_user}","gists_url":"https://api.github.com/users/FredyC/gists{/gist_id}","starred_url":"https://api.github.com/users/FredyC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FredyC/subscriptions","organizations_url":"https://api.github.com/users/FredyC/orgs","repos_url":"https://api.github.com/users/FredyC/repos","events_url":"https://api.github.com/users/FredyC/events{/privacy}","received_events_url":"https://api.github.com/users/FredyC/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-05-18T18:50:20Z","updated_at":"2016-05-19T06:48:33Z","closed_at":"2016-05-19T05:41:39Z","body":"It feels little but strange that you can essentially add methods, statics and stuff in initializer, but you cannot actually compose any further. Even the fact that you have access to compose method itself and it does nothing might confuse some people.\r\n\r\n```js\r\nfunction initializeNodeModel(nodeInstance, { stamp }) {\r\n\tstamp.compose(\r\n\t\tGetter('nodeInstance', nodeInstance)\r\n\t);\r\n}\r\n```\r\n\r\nI tried also this, which might have been working, but it wont copy my Symbol properties (#86), so not much useful either.\r\n\r\n```js\r\nfunction initializeNodeModel(nodeInstance, { instance, stamp }) {\r\n\treturn stamp.compose(\r\n\t\tinstance,\r\n\t\tGetter('behaviorNode', nodeInstance)\r\n\t).create();\r\n}\r\n```\r\n\r\nMaybe after adding support for Symbol this might work, but still it's bit insane that you have instance and you throw it away to make a new one. Perhaps I should just rethink the way I am doing this in here..."},"comment":{"url":"https://api.github.com/repos/stampit-org/stamp-specification/issues/comments/220241551","html_url":"https://github.com/stampit-org/stamp-specification/issues/88#issuecomment-220241551","issue_url":"https://api.github.com/repos/stampit-org/stamp-specification/issues/88","id":220241551,"user":{"login":"koresar","id":1622575,"avatar_url":"https://avatars.githubusercontent.com/u/1622575?v=3","gravatar_id":"","url":"https://api.github.com/users/koresar","html_url":"https://github.com/koresar","followers_url":"https://api.github.com/users/koresar/followers","following_url":"https://api.github.com/users/koresar/following{/other_user}","gists_url":"https://api.github.com/users/koresar/gists{/gist_id}","starred_url":"https://api.github.com/users/koresar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koresar/subscriptions","organizations_url":"https://api.github.com/users/koresar/orgs","repos_url":"https://api.github.com/users/koresar/repos","events_url":"https://api.github.com/users/koresar/events{/privacy}","received_events_url":"https://api.github.com/users/koresar/received_events","type":"User","site_admin":false},"created_at":"2016-05-19T06:48:33Z","updated_at":"2016-05-19T06:48:33Z","body":"Ah, right. Good it works for you. ☺️\n\nHere goes my favourite quote: Premature optimization is the root of all\nevil.\n\nCheers mate\n\nOn Thu, 19 May 2016, 16:45 Daniel K. <notifications@github.com> wrote:\n\n> Ok I think understand what you mean now. The Getter, Setter, etc... are\n> not stamps. I would not call them factory functions either. They are just\n> wrappers for having closure and this wrapper creates a stamp. Essentially\n> what you are proposing is something like this, correct?\n>\n> const NodeModel = Model('Node')\n>\n> .getter('name')\n> .getter('description')\n> .getter('nodeInstance')\n> .statics({ buildFromInstance })\n> );\n>\n> I've decided I don't like such chaining approach. It creates a stamp in\n> every separate step while throwing away previous one. For my approach I am\n> getting one stamp created at single step.\n>\n> Also as I explained in gitter, I cannot reuse that getter to make\n> read/write property too.\n>\n> —\n> You are receiving this because you commented.\n>\n>\n> Reply to this email directly or view it on GitHub\n> <https://github.com/stampit-org/stamp-specification/issues/88#issuecomment-220241029>\n>\n"}}