Hi Florian,
On Fri, Mar 22, 2024 at 9:47 AM Florian Schmaus <flo(a)geekplace.eu> wrote:
Yes, Smack models Nonzas as language-level type and
uses this type in
its API. Among other things, this makes the API and implementation less
error prone.
For example, assume a XMPP library written in an
object-oriented
language. There is a superclass TopLevelStreamElement which has one
obvious subclass named Stanza. Now, how should we name the other
subclass? TopLevelElementThatIsNotAStanza? Feels ridiculous.
You are making a lot of good arguments from the perspective of an API
developer. I 100% agree that it makes sense on a library level to
distinguish between Stanzas and 'top level stream elements that are
not stanzas' for reasons that have been outlined here many times (One
gets counted for SM, one gets routed, one is only allowed after bind
etc). In fact the low level parts of the XMPP code I wrote uses
similar (if not the same) hierarchy of classes.
If this XEP was an informational XEP called "Common Terminology for
XMPP libraries" that was optionally to implement (or even suggested by
a "library" section of the Compliance Suite) I might even like it.
However it is not. The XEP as proposed has major implications on the
language used in existing, stable, XEPs such as SM and CSI and every
future XEP we write. I don’t like that for the reasons outlined by
Kev, Dave, Sam and myself.
cheers
Daniel