You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Stefan Mainz <St...@Dynaware.de> on 2000/09/08 09:17:05 UTC

Re: User Design Issues, principle, and the whole philosophy (whois your customer, anyway?

Jon Stevens wrote:
> 
> on 9/1/2000 3:08 PM, "Jon Stevens" <jo...@latchkey.com> wrote:
> 
> > Again, I think that having alternatives in the language is a bad thing. It
> > isn't definite enough and in this case doubles the amount of things that
> > people need to be aware of.
> 
> Perl is another bad case of this.
> 
> In my opinion, having more than one way to do the same thing isn't necessary
> a good thing. It makes for code that is readable by one person, but not
> necessarily readable by another.

I totally agree with you Jon. Having more twan one syntax for a block
does confuse
users. We switched to use the #begin # end syntax just because it is
more readible
in templates and conforms more to the syntax of the other directives in
webmacro.

Personally i would like to have implicit blocks like someone suggested
#if .. #end.

If the parsers are plugable we could have one for each syntax. The
interpreter part
does not need to know the syntax of a block to interpret it if it is
given an tree
to work on.

Stefan
-- 
Dynaware Systemberatung GmbH                 Tel: +49 89
743130-15                 
Am Westpark 7                                Fax: +49 89
743130-05            
81373 Müchnen                                mobil: +49 171
6920761               
http://www.dynaware.de                      
mailto:Stefan.Mainz@Dynaware.de

Re: User Design Issues, principle, and the whole philosophy (whois your customer, anyway?

Posted by Jason van Zyl <jv...@periapt.com>.
On Fri, 8 Sep 2000, Stefan Mainz wrote:

> Jon Stevens wrote:
> > 
> > on 9/1/2000 3:08 PM, "Jon Stevens" <jo...@latchkey.com> wrote:
> > 
> > > Again, I think that having alternatives in the language is a bad thing. It
> > > isn't definite enough and in this case doubles the amount of things that
> > > people need to be aware of.
> > 
> > Perl is another bad case of this.
> > 
> > In my opinion, having more than one way to do the same thing isn't necessary
> > a good thing. It makes for code that is readable by one person, but not
> > necessarily readable by another.
> 
> I totally agree with you Jon. Having more twan one syntax for a block
> does confuse
> users. We switched to use the #begin # end syntax just because it is
> more readible
> in templates and conforms more to the syntax of the other directives in
> webmacro.
> 
> Personally i would like to have implicit blocks like someone suggested
> #if .. #end.
> 
> If the parsers are plugable we could have one for each syntax. 

That's exactly what we're doing right now!

> The
> interpreter part
> does not need to know the syntax of a block to interpret it if it is
> given an tree
> to work on.

Yup, we are settling on an intermediate format for the parse
tree. All parsers will profer up a parse tree in the intermediate
format then the rest of the tools take over. So anyone who
creates a parser can take advantage of the rest of the
tools in velocity. You could make your own syntax if
you like! I don't really recommend that, but you could :-)

jvz.

-- 

Jason van Zyl
jvanzyl@periapt.com