You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Johan Compagner <jc...@gmail.com> on 2008/04/12 11:14:22 UTC

Vararg all the add(xxx) methods or not?

I ask the same question on the meeting and there they pretty much all
said why not..

So
add(Component... child)
add(IBehavior... behavior)
add(IValidator... validator)

Johan

Re: Vararg all the add(xxx) methods or not?

Posted by Maurice Marrink <ma...@gmail.com>.
true, unfortunately the jvm does not yet have a method to turn off
silly code. When it does suddenly a whole lot of application won't run
anymore ;)

Maurice

On Sat, Apr 12, 2008 at 9:17 PM, Johan Compagner <jc...@gmail.com> wrote:
> that would be silly code :)
>
>  But i dont mind to much, i just kept the null check to be sure.
>
>
>
>  On Sat, Apr 12, 2008 at 9:03 PM, Maurice Marrink <ma...@gmail.com> wrote:
>
>  > you could still do add((IBehavior[])null) so the null check needs to stay.
>  >
>  > Maurice
>  >
>  > On Sat, Apr 12, 2008 at 8:52 PM, Igor Vaynberg <ig...@gmail.com>
>  > wrote:
>  > > is check on component:935 needed? can behaviors array ever be null?
>  > >  add((ibehavior)null) will give you ibehavior[]{null} no?
>  > >
>  > >  -igor
>  > >
>  > >
>  > >
>  > >
>  > >  On Sat, Apr 12, 2008 at 11:36 AM, Johan Compagner <jc...@gmail.com>
>  > wrote:
>  > >  > ok i committed it
>  > >  >  Let see how this works then.
>  > >  >
>  > >  >  On Sat, Apr 12, 2008 at 11:14 AM, Johan Compagner <
>  > jcompagner@gmail.com>
>  > >  >  wrote:
>  > >  >
>  > >  >
>  > >  >
>  > >  >  > I ask the same question on the meeting and there they pretty much
>  > all
>  > >  >  > said why not..
>  > >  >  >
>  > >  >  > So
>  > >  >  > add(Component... child)
>  > >  >  > add(IBehavior... behavior)
>  > >  >  > add(IValidator... validator)
>  > >  >  >
>  > >  >  > Johan
>  > >  >  >
>  > >  >
>  > >
>  >
>

Re: Vararg all the add(xxx) methods or not?

Posted by Johan Compagner <jc...@gmail.com>.
that would be silly code :)

But i dont mind to much, i just kept the null check to be sure.

On Sat, Apr 12, 2008 at 9:03 PM, Maurice Marrink <ma...@gmail.com> wrote:

> you could still do add((IBehavior[])null) so the null check needs to stay.
>
> Maurice
>
> On Sat, Apr 12, 2008 at 8:52 PM, Igor Vaynberg <ig...@gmail.com>
> wrote:
> > is check on component:935 needed? can behaviors array ever be null?
> >  add((ibehavior)null) will give you ibehavior[]{null} no?
> >
> >  -igor
> >
> >
> >
> >
> >  On Sat, Apr 12, 2008 at 11:36 AM, Johan Compagner <jc...@gmail.com>
> wrote:
> >  > ok i committed it
> >  >  Let see how this works then.
> >  >
> >  >  On Sat, Apr 12, 2008 at 11:14 AM, Johan Compagner <
> jcompagner@gmail.com>
> >  >  wrote:
> >  >
> >  >
> >  >
> >  >  > I ask the same question on the meeting and there they pretty much
> all
> >  >  > said why not..
> >  >  >
> >  >  > So
> >  >  > add(Component... child)
> >  >  > add(IBehavior... behavior)
> >  >  > add(IValidator... validator)
> >  >  >
> >  >  > Johan
> >  >  >
> >  >
> >
>

Re: Vararg all the add(xxx) methods or not?

Posted by Maurice Marrink <ma...@gmail.com>.
you could still do add((IBehavior[])null) so the null check needs to stay.

Maurice

On Sat, Apr 12, 2008 at 8:52 PM, Igor Vaynberg <ig...@gmail.com> wrote:
> is check on component:935 needed? can behaviors array ever be null?
>  add((ibehavior)null) will give you ibehavior[]{null} no?
>
>  -igor
>
>
>
>
>  On Sat, Apr 12, 2008 at 11:36 AM, Johan Compagner <jc...@gmail.com> wrote:
>  > ok i committed it
>  >  Let see how this works then.
>  >
>  >  On Sat, Apr 12, 2008 at 11:14 AM, Johan Compagner <jc...@gmail.com>
>  >  wrote:
>  >
>  >
>  >
>  >  > I ask the same question on the meeting and there they pretty much all
>  >  > said why not..
>  >  >
>  >  > So
>  >  > add(Component... child)
>  >  > add(IBehavior... behavior)
>  >  > add(IValidator... validator)
>  >  >
>  >  > Johan
>  >  >
>  >
>

Re: Vararg all the add(xxx) methods or not?

Posted by Igor Vaynberg <ig...@gmail.com>.
is check on component:935 needed? can behaviors array ever be null?
add((ibehavior)null) will give you ibehavior[]{null} no?

-igor


On Sat, Apr 12, 2008 at 11:36 AM, Johan Compagner <jc...@gmail.com> wrote:
> ok i committed it
>  Let see how this works then.
>
>  On Sat, Apr 12, 2008 at 11:14 AM, Johan Compagner <jc...@gmail.com>
>  wrote:
>
>
>
>  > I ask the same question on the meeting and there they pretty much all
>  > said why not..
>  >
>  > So
>  > add(Component... child)
>  > add(IBehavior... behavior)
>  > add(IValidator... validator)
>  >
>  > Johan
>  >
>

Re: Vararg all the add(xxx) methods or not?

Posted by Johan Compagner <jc...@gmail.com>.
ok i committed it
Let see how this works then.

On Sat, Apr 12, 2008 at 11:14 AM, Johan Compagner <jc...@gmail.com>
wrote:

> I ask the same question on the meeting and there they pretty much all
> said why not..
>
> So
> add(Component... child)
> add(IBehavior... behavior)
> add(IValidator... validator)
>
> Johan
>

Re: Vararg all the add(xxx) methods or not?

Posted by Tim O'Brien <to...@discursive.com>.
Would also make sense to make  
MarkupContainer#addOrReplace(Component... child)

Tim

On Apr 12, 2008, at 4:14 AM, Johan Compagner wrote:

> I ask the same question on the meeting and there they pretty much all
> said why not..
>
> So
> add(Component... child)
> add(IBehavior... behavior)
> add(IValidator... validator)
>
> Johan


Re: Vararg all the add(xxx) methods or not?

Posted by Johan Compagner <jc...@gmail.com>.
yes i meant as a replacement

not an addition

On Sat, Apr 12, 2008 at 8:28 PM, Igor Vaynberg <ig...@gmail.com>
wrote:

> then can we get rid of add(Component), add(IBehavior), etc ?
>
> -igor
>
>
> On Sat, Apr 12, 2008 at 2:14 AM, Johan Compagner <jc...@gmail.com>
> wrote:
> > I ask the same question on the meeting and there they pretty much all
> >  said why not..
> >
> >  So
> >  add(Component... child)
> >  add(IBehavior... behavior)
> >  add(IValidator... validator)
> >
> >  Johan
> >
>

Re: Vararg all the add(xxx) methods or not?

Posted by Igor Vaynberg <ig...@gmail.com>.
then can we get rid of add(Component), add(IBehavior), etc ?

-igor


On Sat, Apr 12, 2008 at 2:14 AM, Johan Compagner <jc...@gmail.com> wrote:
> I ask the same question on the meeting and there they pretty much all
>  said why not..
>
>  So
>  add(Component... child)
>  add(IBehavior... behavior)
>  add(IValidator... validator)
>
>  Johan
>

Re: Vararg all the add(xxx) methods or not?

Posted by Ryan Gravener <ry...@ryangravener.com>.
+1 nb

On Sat, Apr 12, 2008 at 5:57 AM, Martijn Dashorst
<ma...@gmail.com> wrote:
> It doesn't break API, just binary compatibility. Should just be a
>  recompile then... I'm not sure if it will be used much, but it doesn't
>  add bloat and doesn't create wrong impressions. For those that do like
>  to work this way it adds the feature without bothering those that
>  don't.
>
>  +1
>
>  Martijn
>
>
>
>  On 4/12/08, Johan Compagner <jc...@gmail.com> wrote:
>  > I ask the same question on the meeting and there they pretty much all
>  >  said why not..
>  >
>  >  So
>  >  add(Component... child)
>  >  add(IBehavior... behavior)
>  >  add(IValidator... validator)
>  >
>  >
>  >  Johan
>  >
>
>
>  --
>  Buy Wicket in Action: http://manning.com/dashorst
>  Apache Wicket 1.3.2 is released
>  Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.2
>



-- 
Ryan Gravener
http://ryangravener.com

Re: Vararg all the add(xxx) methods or not?

Posted by Martijn Dashorst <ma...@gmail.com>.
It doesn't break API, just binary compatibility. Should just be a
recompile then... I'm not sure if it will be used much, but it doesn't
add bloat and doesn't create wrong impressions. For those that do like
to work this way it adds the feature without bothering those that
don't.

+1

Martijn

On 4/12/08, Johan Compagner <jc...@gmail.com> wrote:
> I ask the same question on the meeting and there they pretty much all
>  said why not..
>
>  So
>  add(Component... child)
>  add(IBehavior... behavior)
>  add(IValidator... validator)
>
>
>  Johan
>


-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.2

Re: Vararg all the add(xxx) methods or not?

Posted by Frank Bille <fr...@apache.org>.
Can't see why not

Frank

On Sat, Apr 12, 2008 at 11:14 AM, Johan Compagner <jc...@gmail.com> wrote:
> I ask the same question on the meeting and there they pretty much all
>  said why not..
>
>  So
>  add(Component... child)
>  add(IBehavior... behavior)
>  add(IValidator... validator)
>
>  Johan
>