Re: [Freemarker-devel] Ideal tag syntax; what's your take on it?

Daniel Dekany <[email protected]>
Newsgroups gmane.comp.web.freemarker.user,gmane.comp.web.freemarker.devel
Message-ID <[email protected]>
Friday, June 10, 2011, 12:28:35 PM, Denis Bredelet wrote:

>> Friday, June 10, 2011, 8:36:15 AM, Denis Bredelet wrote:
[snip]
> I really don't mind the verboseness here. Keep [/@] as a shortcut.

I like to avoid choice in syntax if it doesn't bring much... Like
here, some people will use @end, some will use /@, and the result is a
mess. Also, new users will have to realize that the two means the
same. So then I rather just force everybody to use /@.

BTW, to prevent misunderstandings, I would like to emphasize that we
aren't (necessarily) talking about FreeMarker here. It's just brain
storming... I don't promise that any of these will make into a
template language, let alone into FreeMarker.

>> Anyway, what I was
>> originally thinking about is:
>> 
>>  [#foo {]
>>    ...
>>  [}]
>> 
>>  or [} #foo], optionally.
>> 
>> and
>> 
>>  [#foo]
>> 
>> Quite obvious. I was happy with the idea, until I tried it in real
>> templates, and there I found it looks kind of noisy, because the {}-s
>> and [] looks to similar. That's maybe nit-picking, but... I have found
>> that despite it's *weird* and has steeper "learning curve", this looks
>> better after you get used to it:
>> 
>>  [#foo :]
>>    ...
>>  [#.]
>
> Ok but if we use colon for named arguments it will clash.

Technically it doesn't, no problems there. Visually, a bit it does,
although ":]" which is always at the end of the tag anyway (and you
are supposed to see easily where a tag starts and ends) is easy to
spot and comprehend. For me at least.

> How about:
>
> [#foo]
> ...
> [#.]
>
> [#foo.]

The goal was to get rid of the upside-down situation where tag of
directive calls without nested content needs an extra character, while
tags that open nested content doesn't. (But maybe that goal itself is
mistaken.) So now we are back where we come from, except you are
basically that "." looks better than "/". (To be exact you also have
[#.] instead of [.#], which is a further difference from SGML's
approach.) Unless "." looks sooo much better than "/", and I doubt
that, I don't think it's a good tradeoff. If you keep the SGML-ish
logic (I mean that tags by default open a nested content), you might
as well keep "/", because however ugly it is, people are familiar with
it from HTML.

>> 
>>  or [#. foo], optionally.
>
> -- Denis.

-- 
Best regards,
 Daniel Dekany


------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.