Open MaxGraey opened 2 years ago
I would probably wait documenting these as long as there is nothing noteworthy these can do in addition, like hex float notation?
Ok, what is the best place e to put this into doc?
Can we merge it?
Discussion in Discord got me thinking about this again. Do I remember correctly that initially there was the thought of instead providing parseInt<T = f64>(str: string): T
, and that you had preferred that originally?
Here description & motivation: https://github.com/AssemblyScript/assemblyscript/pull/2465
Thanks, now I remember the context. Do you know what were the reasons for not considering to make parseInt
and parseFloat
generic instead? Seems that we ultimately ended up aliasing anyway.
Generic parseInt and parseFloat don't seem to solve this problem, because most likely we have to do something like parseInt<T = f64>(...) and parseFloat<T = f64>(...). Otherwise users will already have two compiled errors for these methods without explicitly specifying parameters. And I still suggest making the parseInt and parseFloat methods as deprecated
@dcodeIO could you take a look please?