From: David G. <go...@py...> - 2003-05-12 01:35:04
|
[Stefan Merten] > PS: If you find some pieces of cynicism in this mail you may not be > totally wrong. I found it extremely snotty. No need for that here. [Stefan Merten] >>> Since David seems to be decided to introduce the unholy attribute >>> named ``class`` in HTML - could it get at least a correct name in >>> reST? [Aahz] >> Why do you call it unholy? > > Because you can do something like this: > > <p class="h1">This is the header - disguised as a <b > class="i">paragraph (rendered in italics)</b></p> > > <p class="l1">A list disguised as a paragraph</p> > <table class="p">A paragraph disguised as a table</table> > > I think you get the idea. That's simply abuse. You cannot prevent abuse with a name change. When the abuser realizes that the "variant" or "format" (or whatever) attribute is translated to HTML "class", they'll abuse it anyway. > In HTML you can see that this kind of misuse is done all the time. > Misuse of this sort is one of the reasons why the structural idea of > HTML today is more or less forgotten. Why open up that door in reST as > well? Instead I'd plead to fully understand which problem is to be > solved here. The problem to be solved here is that the document or application author wants to tag a document element for later selection. This typically means they want to identify a variation of the document element for special processing or formatting. We want to add functionality to allow this type of tagging/identification, so that minor variations can be implemented without changes to the Docutils code. I think "class" is as good a term as any. It's usage is identical to that of "a constellation-class starship" or "first-class postage" or "economy-class seat". From my dictionary, 1. a number of persons or things regarded as belonging together befcause of common attributes, qualities, or traits; kind; sort. ... 13. *Math.* a set; a collection. > It should be called ``format`` if this is the intended meaning. "Format" is not the intended meaning. The purpose of the attribute is to indicate an "is-a" relationship, not "format-as". So '<block_quote class="epigraph">' means "this is an epigraph-class block quote". It doesn't specify any formatting; it implies "do with it as you will". I recommend against format-specific use. > In my years and years of programming and making concepts for > programming tasks I learned one thing: The best thing you can have > is a good concept matching the thing you want to implement most > closely. For that you need to understand what you want to implement > and in cases like this find a name which transmits this meaning as > good as possible. I agree with this. If you look back through the mailing list archives, you'll see many examples where I've agonized over the naming of something. I didn't agonize over "class", probably because it fit the idea well. One thing I've learned over the years is that sarcasm, disrespect, and a bad attitude are rarely beneficial in a discussion, especially a technical discussion via email. Such behavior usually results in bad feelings all around, the perpetrator's ideas being dismissed, and the perpetrator being added to people's kill-files. Please stop. -- David Goodger http://starship.python.net/~goodger Programmer/sysadmin for hire: http://starship.python.net/~goodger/cv |