Re: Patch and test to allow component calls

Alex Robinson <[email protected]>
Newsgroups gmane.comp.web.mason.devel
Message-ID <a0611044abd75f01f8ff6@[192.168.1.201]>
>Both single-line and multi-line comments work in 1.26 without an 
>ending line break. I'm not sure when it was fixed - possibly in the 
>course of fixing another bug. We can close the bug after adding 
>tests for it.

Noted.

>Here's an example I've stated before:
>
>    <& /foo |&>
>    <& /bar |&>
>       ...
>    </& /foo>
>    </& /bar>

[ I can't let it go another time ;)

    <&| /foo &> not <& /foo |&> ]

>This it makes it look like foo and bar are filtering different, 
>overlapping >sections, when of course they are not.

Indeed, but:

    <&| /foo &>
    <&| /bar &>
      ...
    </&><% #/foo %>
    </&><% #/bar %>

also runs into the same problem. And as I pointed out in the previous 
mail, I'd wager that it's more fragile than the </& foo> solution. 
We've been here before though. It is up to the coder to maintain 
their code and their comments. Really. What I am proposing is to make 
that job easier. Which is as I said what this discussion should be 
about.


>Because it goes completely against people's experience with other 
>languages. Minimizing surprise is one of the goals of language 
>design. I've never seen a closing tag in any other markup language 
>that can contain arbitrary non-matching text. I don't wish to be the 
>first.

But equally, what other markup languages have closing tags which 
don't namecheck the tag they're closing?

I'll admit it - this is the only real argument you've made but it is 
a convincing one. It's only my ignorance that's prompted my question. 
Does there exist such a beast - and please don't say S-expressions...

>Yes, I agree, it reads better and is more succinct. But it suggests very
>strongly to that casual mason writer that the parser is doing something that
>it is not. And it allows misleading, out-of-order closing tags to be created.
>Unfortunately the former has to take a back seat to the latter.

Yes it allows out-of-order closing tags to be created. But its a 
non-sequitur to say that that prevention of that harmless side-effect 
is a loftier goal than allowing for more succinct and easier-to-read 
code.


>Someday we should try to make cwc more like custom tags. For 
>example, have one or more configurable directories that contain cwc 
>components, and then allow syntax like
>
>   <%NoNewlines>
>     ...
>     <%Uppercase>
>      ...
>     </%Uppercase>
>     ...
>    </%NoNewlines>


NO NEW SYNTAX!!!

;)



Don't any of the other developers have any comment to make?


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
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.