[x3d-public] unconnected proto fields

Michalis Kamburelis michalis.kambi at gmail.com
Fri Oct 23 10:57:39 PDT 2020


I would say "Silently ignore" is what should be done. Specification
doesn't require that all prototype parameters are used.

Some optional 'hint" from a browser ("the parameter xxx is unused")
may be helpful, but I would not call it a "warning". It may be a valid
situation. It's just like having a routine in any programming language
with an unused parameter: it is allowed, and sometimes it makes sense
(even when it's not a virtual method or a callback, where parameters
are forced to satisfy external requirements).

Example when it makes sense:

- maybe the author declares some prototype parameter, but has not
"implemented" it yet in the prototype? E.g. I have a PROTO "Car" where
I expose "SFColor color", but it's not yet implemented, and the
prototype always expands to a black car?

- maybe it was implemented but is temporarily commented out?

- maybe it was implemented one day, and it no longer works, but it
remains declared for 100% backward compatibility of the API? I.e.
author doesn't want to break existing EXTERNPROTO usage of the PROTO,
so it is better to leave an unused PROTO parameter.

Regards,
Michalis

pt., 23 paź 2020 o 19:45 Andreas Plesch <andreasplesch at gmail.com> napisał(a):
>
> A ProtoDeclaration may have fields in the interface definition which
> are then not connected to any fields or nodes in the ProtoBody.
>
> This is usually not the case since it does not seem to serve a
> purpose. Nonetheless authors may inadvertently define such unconnected
> fields in a ProtoInterface.
>
> Is there a requirement for such a connection ?
>
> Could there be a sensible use case for unconnected Proto fields ?
>
> How should a browser react to this?
>
> Silently ignore ? This is apparently the behaviour of many X3D
> browsers currently.
> Fail early ? To prevent any subsequent problems flowing from such an
> occurrence ? This is what x3dom currently does.
> A warning ? Seems reasonable unless there is a spec. requirement.
>
> -Andreas
>
> --
> Andreas Plesch
> Waltham, MA 02453
>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org



More information about the x3d-public mailing list