Why is GetConVarNumber deprecated and cvars.Number is not?

Here is the code for cvars.Number - https://github.com/Facepunch/garrysmod/blob/784cd57576d85712fa13a7cea3a9523b4df966b0/garrysmod/lua/includes/modules/cvars.lua#L121

It is shown that cvars.Number uses GetConVarNumber.

On the Wiki,

GetConVarNumber is deprecated, but

cvars.Number is not. So, why is cvars.Number using a deprecated function, but is not deprecated itself?

Really, the entire cvars library should be deprecated and the callback function should be implemented as a hook.

What if you want to check a convar without having caught it?



GetConVar( "trash" ):GetString()


Of course, this enforces bad behaviours, and caching always speeds things up

GetConVar caches internally too so there’s even less need for those functions.