Syntax (change|improvement) proposal

View: New views
4 Messages — Rating Filter:   Alert me  

Syntax (change|improvement) proposal

by Konstantin Priblouda :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

I think it would be way nicer to write (and read) :

pico.addComponentAdapter(cache(construct()))

than:
p.addComponentAdapter(new CCA(new CICA(...)))

and it  would take only some static method imports

WDYT?



----[ Konstantin Pribluda http://www.pribluda.de ]----------------
JTec quality components: http://www.pribluda.de/projects/


     

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Syntax (change|improvement) proposal

by Paul Hammant-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Go for it :-)

- Paul

On Aug 5, 2008, at 5:36 AM, Konstantin Priblouda wrote:

> Hi all,
>
> I think it would be way nicer to write (and read) :
>
> pico.addComponentAdapter(cache(construct()))
>
> than:
> p.addComponentAdapter(new CCA(new CICA(...)))
>
> and it  would take only some static method imports
>
> WDYT?
>
>
>
> ----[ Konstantin Pribluda http://www.pribluda.de ]----------------
> JTec quality components: http://www.pribluda.de/projects/
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Syntax (change|improvement) proposal

by Mauro Talevi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Konstantin Priblouda wrote:

> Hi all,
>
> I think it would be way nicer to write (and read) :
>
> pico.addComponentAdapter(cache(construct()))
>
> than:
> p.addComponentAdapter(new CCA(new CICA(...)))
>
> and it  would take only some static method imports
>
> WDYT?
>

+1 if it will improve readability.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Syntax (change|improvement) proposal

by Konstantin Priblouda :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



----[ Konstantin Pribluda http://www.pribluda.de ]----------------
JTec quality components: http://www.pribluda.de/projects/


--- On Tue, 8/5/08, Mauro Talevi <mauro.talevi@...> wrote:

>
> +1 if it will improve readability.


And writability ;)   There are already static methods for injection factories
( o.p.i.Injectors )  - so I created class o.p.i.Injector and filling it with life right now

regards,


     

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


LightInTheBox - Buy quality products at wholesale price!