[web-devel] Fwd: proposal for hamlet-like syntax that is more compatible with html
michael at snoyman.com
Mon Dec 13 17:15:08 CET 2010
Yes, you can already quote attribute values (and I think attribute
names as well, though that wouldn't be useful for HTML really). It's
the only way to produce something like style="4.5in", since otherwise
the period gets interpreted as starting a class.
On Mon, Dec 13, 2010 at 4:57 PM, Max Cantor <mxcantor at gmail.com> wrote:
> As a side note, if we use spaces instead !, will there still be a way to quote strings with spaces.. to realize something like <div class="class1 class2 etc">...
> On Dec 13, 2010, at 10:25 PM, Alexandros Salazar wrote:
>> Sorry, this was meant to go to the list.
>> Is there a similar rationale for not having delimiter-wrapped tags like in Haml? The exclamation points make things hard to read in any tag with more than a few attributes (say a form), so having *some* way of having whitespace attributes would be very beneficial. When I show some Hamlet code to people, the first reaction is a very pleased "Oh, hello Haml" followed by a confused "what's with the exclamation points?"
>> On an unrelated note, does anyone know how to make the web-devel list the default reply-to for emails in this list? It's hard to remember to make the changes in the headers required to not accidentally send a private email.
>> On Sun, Dec 12, 2010 at 2:55 PM, Michael Snoyman <michael at snoyman.com> wrote:
>> Sorry, forgot to reply to all...
>> ---------- Forwarded message ----------
>> From: Michael Snoyman <michael at snoyman.com>
>> Date: Sun, Dec 12, 2010 at 6:54 PM
>> Subject: Re: [web-devel] proposal for hamlet-like syntax that is more
>> compatible with html
>> To: Greg Weber <greg at gregweber.info>
>> I'm actually thinking that a good first step on this proposal is
>> simply adding the <> syntax in addition to what we already have. For
>> %foo!bar=baz This is something
>> is equivalent to
>> <foo bar=baz> This is something
>> Without introducing any other changes. I originally did not like the
>> idea of "two hamlets", but I'm beginning to warm up to it as an
>> intermediate step. I'd even consider leaving both of them in there
>> indefinitely, though I'm not sure that's the best idea.
>> I very much would *not* like to implement a proposal such as % and
>> whitespace attributes, eg:
>> %foo bar=baz&This is something
>> I don't like this for two reasons:
>> 1) It's almost, but not quite, what we have right now. I'd much rather
>> do a *big* change over to <> so that it's obvious that a change has
>> 2) I don't want to start gobbling up more symbols.
>> I also am not really interested in using the percent sign for variable
>> interpolation in Hamlet/Cassius: dollar sign is well established for
>> this in many languages, and I only grudgingly used the percent sign in
>> Julius because of jQuery.
>> If I'm not mistaken Greg, this means the part of your proposal which
>> is being excluded by this proposal would be multi-line tags, is that
>> web-devel mailing list
>> web-devel at haskell.org
> web-devel mailing list
> web-devel at haskell.org
More information about the web-devel