Closed nadako closed 8 years ago
Is there any change in standard library where it would make sense to use Any instead of Dynamic?
As mentioned in the proposal, haxe.Unserializer.run
and haxe.Json.parse
are good candidates for this.
I would also use Any
instead of Dynamic
for method signatures of Reflect
, since IMO reflection is a higher level concept than dynamic, and staying type-safe there would be a good thing.
But changing any of this would be a breaking change, so I'm not proposing to do it for now. Maybe we can revise that for Haxe 4.
Ping!
Unfortunately, the discussion took place in the internal Slack chat instead of this PR, but here's the summary:
I'll now adjust the proposal text and merge it. After that I'm gonna adjust and merge the implementation PR to Haxe repository.
Please note that we didn't correctly respected the protocol here : have a consensus between me and Dan does not mean we have a majority to accept the HXP.
You're right... That was unfortunate. I was too excited to get it merged... We need to get everyone to vote somehow...
This proposes introduction of the new
Any
type as a safer alternative toDynamic
when it comes to simply holding "any value".Rendered version here