|
Boost : |
From: joel de guzman (isis-tech_at_[hidden])
Date: 2001-05-31 09:57:04
From: <dg_at_[hidden]>:
> --- In boost_at_y..., "joel de guzman" <isis-tech_at_m...> wrote:
>
> >
> > Also, based on user feedback (including novices), people find the
> prefix
> > kleene star (*) and the prefix positive iterator (+) simple to
> comprehend.
>
> I think that many people would find prefix Kleene closure operations
> confusing.
Hello Dale Gerdemann,
Would you like to explain why?
I can never understand why someone who can comprehend
complex abstractions, build intricate applications and frameworks,
communicate on such a high technical level, absorb all the syntax
rules of c++, find *a versus a* "confusing", while, on the other
hand, a 'newbie' find it to be not confusing at all.
I argue that it is *not* about clarity of syntax at all. It is, plain
and simply, about personal preference. Nothing more.
> Still with the limited C++ operator overloading, you have
> to make some sacrifices. May I suggest a different sacrifice based
> loosely on the syntax of XFST
> (www.xrce.xerox.com/research/mltt/fst/fssyntax.html). In XFST, the
> syntax a^n means n repetitions of a. Just reinterpret this to mean "at
> least n repetitions of a". Then a^0 is Kleene star of 'a' and a^1 is
> Kleene plus of 'a'. At least ^0 and ^1 look almost like postfix
> operators.
>
> -- Dale Gerdemann
>
First, ^ is already in use. Second, I think the current Iteration
syntax a(8); a(0, 8) and a(0,more) is more comprehesive.
Third, what would a^2^5 mean? So we are back to the
a[2][5] debate all over again.
Thanks for your comments.
Joel de Guzman
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk