HaxeFoundation / haxe-evolution

Repository for maintaining proposal for changes to the Haxe programming language
111 stars 58 forks source link

Caller tracking. #99

Open Apprentice-Alchemist opened 2 years ago

Apprentice-Alchemist commented 2 years ago

A replacement for that ?pos:haxe.PosInfos magic.

Rendered proposal

Simn commented 1 year ago

You correctly point that that there's a problem with PosInfos handling vs. rest arguments, but then your design doesn't explain how to actually resolve that in the context of your proposal.

I don't hate the actual design, but I don't think this resolves the problem you want to resolve.

Apprentice-Alchemist commented 1 year ago

You correctly point that that there's a problem with PosInfos handling vs. rest arguments, but then your design doesn't explain how to actually resolve that in the context of your proposal.

With this design the problem simply shouldn't occur anymore, right? Let's say it's implemented by inserting the position information as an implicit first argument (this should work on every target, I think). The implicit argument is not optional, and the compiler inserts the relevant infos on every call, so nothing can go wrong even when rest arguments are involved.