Re: Direct-to-Field mappings now implemented.

2007-02-09 Thread Jeff Butler
I think this is a good idea. However, I wonder if it is necessary to add the extra syntax? Could we be smart enough to use a getter/setter if one exists, else resort to direct field access? Then there would be no need for the extra parenthesis syntax. Jeff Butler On 2/9/07, Clinton Begin

Re: Direct-to-Field mappings now implemented.

2007-02-09 Thread Paul Benedict
I agree with Jeff that an alternative syntax is questionable and likely unnecessary. The syntax for accessing members of an object should be the same, regardless if the property is an instance variable or method. Rather, there should be a flag which enables direct property access which will be

RE: Direct-to-Field mappings now implemented.

2007-02-09 Thread Poitras Christian
Your point is interesting, but wouldn't the () notation break maps transparency? -Original Message- From: Clinton Begin [mailto:[EMAIL PROTECTED] Sent: Friday, 09 February 2007 14:00 To: dev@ibatis.apache.org Subject: Re: Direct-to-Field mappings now implemented. It would be easy to do

Re: Direct-to-Field mappings now implemented.

2007-02-09 Thread Clinton Begin
Yes it would. It's transparency vs. expressiveness and control. I guess it would make it harder to refactor (i.e. encapsulate) a field to a setter method later. HmmmI'm slowly being won over. Keep going and you'll have me. ;-) Does anyone like the (brackets)? If I'm the only one, I'll

Re: Direct-to-Field mappings now implemented.

2007-02-09 Thread Paul Benedict
Poitras and Clinton, I agree. The refactoring argument is pretty strong. Property notation is script-like because the actual means to get to the value (method vs. direct-field access) is totally secondary to the intention. The developer just needs to express the path, and the framework should be

RE: Direct-to-Field mappings now implemented.

2007-02-09 Thread Poitras Christian
I guess you have a point. Probably 90% of developpers won't want to know how the real path used... Even if knowing it is interesting, it might disapoint people to force them to know it in advance. In other cases, getters may include code that will be skipped using direct field access. Now the