"Geir Magnusson Jr." <[EMAIL PROTECTED]> writes:
>On 11/19/01 4:14 AM, "Henning P. Schmiedehausen" <[EMAIL PROTECTED]>
>wrote:
Hi,
sorry if this came over wrongly. I didn't want to flame you. :-(
While I see the reason for this change, I also see the questions in
the .users list about "not working" references, which sometimes
translate to the fact that $foo.Bar must be explicitly return a String
or else you must write $foo.getBar()
(If we would have implicit type casting then you wouldn't have these
effects)
And IMHO we already have a fair amount of guessing what
$foo.Bar
really means. It could be
public String getBar()
public boolean isBar()
public String getbar()
public Object get("Bar")
Quite a lot of meanings for just one innocent expression.
I wrote just last week, that I gave up writing the short cut
expressions just for the sake of not running into errors. I work with
velocity for about half a year now and I still make mistakes when
using $foo.Bar :-)
And IMHO it is a source of silent errors just because there are
different return types. Consider this:
#set($foo = $bar.get($pulltool.Ready))
with
class Bar
{
public Object get(String xxx);
}
class Pulltool
{
public boolean isReady();
}
>> $foo.<bar> for calling getBar()
>> $foo.[bar] for calling isBar()
>Argh. Why don't you just do
> $foo.getBar()
>and
> $foo.isBar()
That above was a joke. Sorry. I should've written @$foo.Bar and
%$foo.bar to make it clearer what I was aiming at (perl).
Regards
Henning
P.S.: If I recall correctly, last time we changed semantics was when
we made the Introspector more smart about public and protected
interface to allow a certain kind of loops over Map.Entry ;-) No,
really, I did like the change.
--
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen -- Geschaeftsfuehrer
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH [EMAIL PROTECTED]
Am Schwabachgrund 22 Fon.: 09131 / 50654-0 [EMAIL PROTECTED]
D-91054 Buckenhof Fax.: 09131 / 50654-20
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>