On 01 Oct 2014, at 15:08, Sven Van Caekenberghe <[email protected]> wrote:
> I am confused about the GTInspector State tab. What is its definition ?
>
> I would say that it shows the raw, fundamental, implementation form of the
> object, in essence what EyeBasicInspector showed. And that additional tabs
> offer alternative, more user friendly views.
>
> Why then does it not show all variable content and only named variables ?
>
> Try inspecting a [Byte]String or [Byte]Array. The State view is useless, it
> just shows self. Some of these have an items view, but not all.
>
> How can I inspect an individual character of a String ? Or an individual byte
> ?
>
> Consider a Float. The State view should show the two (meaningless) slots
> because that is how Floats are (currently) implemented, and then another tab
> should show the sign, mantissa, exponent view.
>
> In the Eye inspectors we also confused these two aspects in a single view,
> which is wrong in hindsight, IMHO. It should be crystal clear for a user
> whether a slot is real or an alternative view of describing the same thing.
>
> I could propose changes or a slice, but I think we should agree on the
> definition of 'State' first.
>
I think this is just a matter of iterating, e.g. Dictionary has it already
correct:
State show the raw state (array, tally), while the “items” view shows nicely
key->values.
an example where it fails is CompiledMethod, it has a Bytecode view, but in
addition a (virtual) “all byte codes” variable in the
raw view. (and more).
I think we need
-> the raw state for every object (like the old basic inspector)
-> this might not be the default view for all objects, though.
(the default should present something useful).
This means, maybe having the notion of a default view would be nice.
-> work to add more views to everything interesting.
Marcus
signature.asc
Description: Message signed with OpenPGP using GPGMail
