W3C home > Mailing lists > Public > www-html@w3.org > March 2003

Re: Font Style Elements

From: Jared Warren <warren@cs.queensu.ca>
Date: 05 Mar 2003 19:04:43 -0500
To: www-html@w3.org
Message-Id: <1046909084.1153.34.camel@foobox.dyndns.org>

> I'll describe as best I can.  Lets pretend I have a Javascript app... 
[deletia]
> extracting ONLY the HTML 
> element(s) at that anchor, and no more.  In other words, the JS code can 
> grab 10 DOM nodes, which could sub-contain any number of other HTML 
> elements.
[deletia]
> parse-out the author-wanted style rules pointed-to by ID="my_div".
[deletia]

Maybe I've been reading too many semantics papers lately, but this
process sound suspiciously like beta-reduction (ie: function
application) in the lambda calculus. And if I may horribly abuse
programming language terminology, I think I can shed some light on the
debate:

-> Wingnut wants styles to be passed-by-value: all style-sheet
inheritance flattened to a single attribute.

-> The opposition wants styles to be passed-by-name: moving an element
requires costly substitution throughout its attached style tree.

In programming languages, pass-by-name has much more attractive
theoretical properties. However pass-by-value is much more efficient and
therefore almost always the choice of language implementers -- but only
in the case of simple types. When you get complex enough types (such as
Java Objects), the overhead to copy (flatten) its data (style) becomes
so great that they are usually passed-by-reference.

I was going to write that, for our purposes, pass-by-name and
pass-by-reference can be treated as identical; however then I realised
that there's actually a compromise between the two positions:
partial-document styles. What I mean is some mechanism that allows an
author to specify which style-sheets apply to a particular or set of
elements.

Now I'm by no means suggesting this is a good idea (I actually like
Idealised Algol!), I'm simply extending the metaphor to its conclusion.
You must admit that it does fulfill the desires of both parties, while
making the system amusingly more complex.

~ Jared Warren <warren@cs.queensu.ca>
Computing Science, Queen's University
Received on Wednesday, 5 March 2003 19:04:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:54 GMT