W3C home > Mailing lists > Public > www-archive@w3.org > July 2001

Re: Classes Considered Harmful

From: Kynn Bartlett <kynn-hwg@idyllmtn.com>
Date: Sat, 07 Jul 2001 21:17:09 -0700
Message-Id: <4.2.0.58.20010707211124.01b382a0@garth.idyllmtn.com>
To: Aaron Swartz <me@aaronsw.com>
Cc: love26@gorge.net (William Loughborough), "Sean B. Palmer" <sean@mysterylights.com>, <w3c-wai-pf@w3.org>, <www-archive@w3.org>
At 08:59 PM 7/7/2001 , Aaron Swartz wrote:
>Apologies - I thought that you folks were creating a set of recommendations for an ideal format, and I did not want Sean's point to be tossed out simply because XHTML didn't follow it.

Well, I think we need to avoid deciding that something like "class"
is always going to be wrong.  I don't think it's a completely wrong
approach, albeit not necessarily "ideal."  (I also think it's dangerous
to assume that we, right now, with limited knowledge and experience
with real-world XML formats, will be able to absolutely design the
requirements for an "ideal" language.  Hubris needs to be avoided and
advice needs to be given -- thus I say the recommendations define a
"better" format, not the "ideal" format.)

>Definitely, XHTML authors should use class. The authors of XHTML shouldn't.

Well, this gets tricky with extensible XHTML (which is the whole
point after all) -- if I'm going to do <div class="foo"> should
I instead create a <foo> tag as part of an XHTML module?  Is that
necessarily a better approach?  XHTML authors may theoretically be 
extenders of their spec, although I don't think it's a normal
situation for them.  Using "class" allows them to "extend" in a half-
assed way, while using modularization or the like allows them to do
formal extension, but formal extension may be as big of a problem,
or worse.  (Which is why I am shying away from the suggestions
raised here that the "right" way is to introduce more attributes
or elements, using namespaces, instead of using class.)

As for what the authors of XHTML should do, well, maybe we should
ask what their plans for "class" are.  I don't think "class" is
at all "harmful" enough that we, as the PF group, should be mandating
that they get rid of it entirely.  (But of course if they're already
planning to dump it, hey, that's up to them.)

--Kynn

-- 
Kynn Bartlett                                    mailto:kynn@hwg.org
President, HTML Writers Guild                    http://www.hwg.org/
AWARE Center Director                    http://www.awarecenter.org/
Received on Sunday, 8 July 2001 00:19:20 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:42:01 UTC