W3C home > Mailing lists > Public > www-style@w3.org > December 2012

Re: Media feature based on parent width instead of viewport/device width

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 17 Dec 2012 09:53:00 -0800
Message-ID: <CAAWBYDBCdq0OCMpTP0Gui=jSN519TR8q-5Y-o-+pVPro1e7Efw@mail.gmail.com>
To: Ben Callahan <ben@heysparkbox.com>
Cc: www-style list <www-style@w3.org>
On Mon, Dec 17, 2012 at 8:47 AM, Ben Callahan <ben@heysparkbox.com> wrote:
> Don't want to push too hard, but is the fact that someone could create an
> infinite loop a valid reason to not implement this kind of thing? I would be
> ultimately frustrated if, say, JavaScript didn't allow me to modify the
> counter inside a loop in the name of preventing bad code. Truth is, people
> can (and will) write bad code in any language...

The problem isn't just that it could create an infinite loop, but that
it can create one in a non-obvious way.  The example I provided was
simple, but it's not difficult to set up more subtle, involved loops.
That's the problem with declarative programming - it can be hard to
tell what's going on once you get past a certain point.

Then, once you have a loop, as Francois points out, figuring out how
to resolve the loop is potentially very expensive as well.

People expect CSS to Just Work (tm) and to be fast.  They don't have
the same expectation of real programming languages like JS.  To
maintain these expectations, we have to design CSS to be safe when
possible.

~TJ
Received on Monday, 17 December 2012 17:53:49 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:03 GMT