{"action":"created","issue":{"url":"https://api.github.com/repos/garrynewman/garrysmod/issues/826","labels_url":"https://api.github.com/repos/garrynewman/garrysmod/issues/826/labels{/name}","comments_url":"https://api.github.com/repos/garrynewman/garrysmod/issues/826/comments","events_url":"https://api.github.com/repos/garrynewman/garrysmod/issues/826/events","html_url":"https://github.com/garrynewman/garrysmod/pull/826","id":44732306,"number":826,"title":"Deprecation","user":{"login":"wiox","id":1499676,"avatar_url":"https://avatars.githubusercontent.com/u/1499676?v=3","gravatar_id":"","url":"https://api.github.com/users/wiox","html_url":"https://github.com/wiox","followers_url":"https://api.github.com/users/wiox/followers","following_url":"https://api.github.com/users/wiox/following{/other_user}","gists_url":"https://api.github.com/users/wiox/gists{/gist_id}","starred_url":"https://api.github.com/users/wiox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wiox/subscriptions","organizations_url":"https://api.github.com/users/wiox/orgs","repos_url":"https://api.github.com/users/wiox/repos","events_url":"https://api.github.com/users/wiox/events{/privacy}","received_events_url":"https://api.github.com/users/wiox/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/garrynewman/garrysmod/labels/low%20priority","name":"low priority","color":"DDDDDD"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":23,"created_at":"2014-10-02T20:01:50Z","updated_at":"2015-03-16T23:46:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/garrynewman/garrysmod/pulls/826","html_url":"https://github.com/garrynewman/garrysmod/pull/826","diff_url":"https://github.com/garrynewman/garrysmod/pull/826.diff","patch_url":"https://github.com/garrynewman/garrysmod/pull/826.patch"},"body":"__Not being merged until after next update, if at all.__\r\n\r\nI'd like to consider this a step in the right direction for cleaning up a lot of inconsistencies in Garry's Mod's function / method naming. Calls to deprecated functions will cause a non-aborting error message once per location.\r\n\r\nThere are still a few things to be done to the DEPRECATE function itself.\r\nIf you have any suggestions for this / functions that should be deprecated, post them. If you have any arguments against this / functions this deprecates, post them.\r\n\r\nMost of the deprecated functions are from http://wiki.garrysmod.com/page/Category:Deprecated_Functions\r\nTwo exceptions for this are math.Min and math.Max, which aren't on the wiki at all.\r\n\r\n```\r\n> print(math.Distance(1, 2, 3, 4))\r\n\t2.8284271247462\r\n\t\r\n> print(math.Dist(1, 2, 3, 4))\r\n\t[ERROR] lua_run:1: calling deprecated function 'math.Dist' (use 'math.Distance')\r\n\t2.8284271247462\r\n```\r\n\r\nI consider this a good idea because, if functions are to be removed in the future, why not convince developers to stop using them in the present?\r\n\r\nView the beef at https://github.com/wiox/garrysmod/blob/deprecate/garrysmod/lua/includes/deprecation.lua\r\n\r\n__Opinions very much needed__"},"comment":{"url":"https://api.github.com/repos/garrynewman/garrysmod/issues/comments/81996941","html_url":"https://github.com/garrynewman/garrysmod/pull/826#issuecomment-81996941","issue_url":"https://api.github.com/repos/garrynewman/garrysmod/issues/826","id":81996941,"user":{"login":"zerfgog","id":4380777,"avatar_url":"https://avatars.githubusercontent.com/u/4380777?v=3","gravatar_id":"","url":"https://api.github.com/users/zerfgog","html_url":"https://github.com/zerfgog","followers_url":"https://api.github.com/users/zerfgog/followers","following_url":"https://api.github.com/users/zerfgog/following{/other_user}","gists_url":"https://api.github.com/users/zerfgog/gists{/gist_id}","starred_url":"https://api.github.com/users/zerfgog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zerfgog/subscriptions","organizations_url":"https://api.github.com/users/zerfgog/orgs","repos_url":"https://api.github.com/users/zerfgog/repos","events_url":"https://api.github.com/users/zerfgog/events{/privacy}","received_events_url":"https://api.github.com/users/zerfgog/received_events","type":"User","site_admin":false},"created_at":"2015-03-16T23:46:59Z","updated_at":"2015-03-16T23:46:59Z","body":"I believe you misunderstand this pull request; have you read the code?\r\nThe functions set to be deprecated are CURRENTLY aliases. They were either created accidentally or by one of the devs who wanted a shortcut/didn't want to remember casing.\r\nThis PR is probably the best way to go about it: it only alerts people that the functions are outdated, hopefully giving some people opportunities to update their addons or addons that are currently not maintained to find a solution. Once this adjustment period has gone on long enough, the functions can then be safely removed outright.\r\n(However, this is the ideal scenario. More than likely, the non-maintained addons out there will pose a problem.)"}}