{"action":"created","issue":{"url":"https://api.github.com/repos/97jaz/datetime-lib/issues/1","repository_url":"https://api.github.com/repos/97jaz/datetime-lib","labels_url":"https://api.github.com/repos/97jaz/datetime-lib/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/97jaz/datetime-lib/issues/1/comments","events_url":"https://api.github.com/repos/97jaz/datetime-lib/issues/1/events","html_url":"https://github.com/97jaz/datetime-lib/issues/1","id":159717155,"number":1,"title":"Possible design change: provide \"smart\" constructors under different names","user":{"login":"97jaz","id":984854,"avatar_url":"https://avatars.githubusercontent.com/u/984854?v=3","gravatar_id":"","url":"https://api.github.com/users/97jaz","html_url":"https://github.com/97jaz","followers_url":"https://api.github.com/users/97jaz/followers","following_url":"https://api.github.com/users/97jaz/following{/other_user}","gists_url":"https://api.github.com/users/97jaz/gists{/gist_id}","starred_url":"https://api.github.com/users/97jaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/97jaz/subscriptions","organizations_url":"https://api.github.com/users/97jaz/orgs","repos_url":"https://api.github.com/users/97jaz/repos","events_url":"https://api.github.com/users/97jaz/events{/privacy}","received_events_url":"https://api.github.com/users/97jaz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-10T20:33:51Z","updated_at":"2016-06-10T21:34:48Z","closed_at":null,"body":"@jackfirth If you saw my recent post to the racket-users mailing list, you know that I'm struggling with trying to get custom struct constructors, match expanders, and contract boundaries all playing nicely together. I'm beginning to think that I'm just trying to fight too much against Racket's preferred way of doing things.\r\n\r\nSo what do you think about providing the \"smart\" constructors under different names? Like `make-date`, `make-datetime`, etc.? The default constructors would also be provided. In the case of `date` and `time`, this is kind of silly, since the smart constructors only differ from the default ones in that they provide default field values. So, for example, you could use `(make-date 2000)` as opposed to `(date 2000 1 1)`. \r\n\r\nIn the case of `datetime`, however, both constructors are actually useful. The smart constructor would take a year, month, day, hour, etc., while the default one would take a `date` and a `time` and combine them.\r\n"},"comment":{"url":"https://api.github.com/repos/97jaz/datetime-lib/issues/comments/225301654","html_url":"https://github.com/97jaz/datetime-lib/issues/1#issuecomment-225301654","issue_url":"https://api.github.com/repos/97jaz/datetime-lib/issues/1","id":225301654,"user":{"login":"jackfirth","id":8175575,"avatar_url":"https://avatars.githubusercontent.com/u/8175575?v=3","gravatar_id":"","url":"https://api.github.com/users/jackfirth","html_url":"https://github.com/jackfirth","followers_url":"https://api.github.com/users/jackfirth/followers","following_url":"https://api.github.com/users/jackfirth/following{/other_user}","gists_url":"https://api.github.com/users/jackfirth/gists{/gist_id}","starred_url":"https://api.github.com/users/jackfirth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jackfirth/subscriptions","organizations_url":"https://api.github.com/users/jackfirth/orgs","repos_url":"https://api.github.com/users/jackfirth/repos","events_url":"https://api.github.com/users/jackfirth/events{/privacy}","received_events_url":"https://api.github.com/users/jackfirth/received_events","type":"User","site_admin":false},"created_at":"2016-06-10T21:34:48Z","updated_at":"2016-06-10T21:34:48Z","body":"In general, I'm against two different constructors. I think I would prefer the smart constructor have keyword arguments like #:year, #:month, #:minutes, etc. as well as keyword arguments for #:date and #:time so it can be constructed both ways. Or at least I would prefer that approach to two different date constructors."}}
{"actor":{"display_login":"jackfirth"}}