New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[js std] trace improvements #5639
Comments
I agree about |
IMHO it's fine to output the raw / native value "by default", and have something very light in |
That makes sense to me, but I don't know who's the one to make the call about it. @ncannasse ? |
While we're at it, I was wondering if it would be feasible to inline the call to |
Not sure if that's possible, since haxe.Log.trace is a dynamic method and hence is not inlineable. |
Actually, I think we could just generate |
I'm gonna proceed cleaning this up, starting by removing |
we might want to provide a legacy trace function in hx3compat
Can this be closed? |
Let me know if there's something left to do here. |
The idea was to try generating |
Ping @mastef. IIRC he had very strong feelings about this ^^ |
I think it would be fantastic if Currently it's a pity that So it would be great to have this functionality natively instead. ( And if somebody really requires string literals output to console, then a switch could be provided. ) I remember there was a macro version somewhere of this - and one approach made it into this gist. And then there is also this fine library. |
in https://github.com/HaxeFoundation/haxe/blob/development/std/js/Boot.hx#L47-L65
div#haxe:trace
should be moved to a legacy class, and included only if-D legacy-trace
or similar__string_rec
should be used only in this case (ie: when theconsole
is not used)console
, we should passv
andi.customParams
as-is, and let the JS environment deal with displaying the dataIf you want, I can make a PR with that improvement.
The text was updated successfully, but these errors were encountered: