-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
Why was the Display implementation for Object removed? #170
Comments
Hey @IovoslavIovchev I can answer this one. After investigation I saw that the printer prints every property and slot for an object. I think for now I changed object to just print {} (I tried reducing it to just properties but I can’t remember why that didn’t work) Anyway, there is some work to be done need to match whatever the other implementations do |
The output was getting too big and verbose. If there is a nice way to pretty print objects I’m for it. |
If you wish to experiment you can try adding it back, then try printing a string object |
I tried various forms of Did a stack overflow occur every time, or just in particular cases? |
One way to avoid verbosity (and a stack overflow) would be to only print own properties and not print the prototype, if that is something that might be deemed acceptable. Additionally, pretty printing can be achieved by simply printing each new property on a new line. |
Sure, it’s a good start I think all objects should attempt to call their own .toString() counterpart before being displayed anyway. In terms of the overflow, I don’t remember how to reproduce the issue, but it only happened when slots were exposed. |
I will take a look at re-implementing |
Thanks @IovoslavIovchev |
Done in #211 |
Hello,
While playing around with this project I came accross:
and, after some digging, I found that at some point in the past
Display
was implemented forValueData::Object
(as far as I know, arrays inboa
are objects).So why exactly was it removed? Was it because the previous implementation was too verbose?
The text was updated successfully, but these errors were encountered: