W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2013

Re: E4H compatible with string templates

From: Mike Samuel <mikesamuel@gmail.com>
Date: Thu, 14 Mar 2013 20:10:37 -0400
Message-ID: <CACod6GuprcPLL4QHeYiF6t4f2F3VnWnz1Bujy=K6ybZp6bReNQ@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Ian Hickson <ian@hixie.ch>, "public-script-coord@w3.org" <public-script-coord@w3.org>, Adam Barth <w3c@adambarth.com>
2013/3/14 Tab Atkins Jr. <jackalmage@gmail.com>:
> On Thu, Mar 14, 2013 at 3:37 PM, Mike Samuel <mikesamuel@gmail.com> wrote:
>> 2013/3/14 Ian Hickson <ian@hixie.ch>:
>>> On Thu, 14 Mar 2013, Mike Samuel wrote:
>>>>
>>>> Here's an implementation of Ian's E4H proposal on top of string templates
>>>
>>> It seems to miss one of the most important features in E4H, the
>>> compile-time syntax checking.
>>
>> Yeah.  It's not an early error.  I still don't understand why that's
>> so important.
>
> Because if it's *guaranteed* to be a run-time error (and it is), then
> it's better if it can be detected at compile-time instead.  Why wait
> to throw an error until that particular code-path actually gets
> tickled?

I understand the reasons for preferring early errors when all else is
equal, but it seems to me that the benefit does not outweigh the cost
of specifying something before it's been test-driven by the developer
community, thus my preference for general features that enable
experimentation where possible.

It also seems to me that projects that would really benefit such early
warnings have options -- lint-tools and test-coverage tools that tell
you when you're not exercising an important code path.
Received on Friday, 15 March 2013 00:11:04 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:09 UTC