One thing that I forgot to mention is that using new XXX() as the new
"stack" instead of up()/back() still allows you to comment/uncomment what
you want and you get some auto indentation for free when using IDEs. :-)
regards, 

-- yuri

Yuri de Wit<[EMAIL PROTECTED]> wrote:
>
>Hi Lars, 
>
>fair enough. The back() (or up() as proposed by Jerome) is indeed more
>flexible (even though I am not sure how an IDE will auto format that -
>minor detail) and I'll be happy to use it as soon as Jerome incorporate it
>instead of what I have been using.
>regards, 
>
>-- yuri
>
>
>Lars Heuer <[EMAIL PROTECTED]> wrote:
>>Hi Yuri,
>>
>>> Interesting...
>>
>>> The approach I was taking was to use Java itself as the stack by using a
>>> "new XXX()" to create/"push" a new entry to the "stack".
>>>  .attach("/a", new Maplet()
>>>         .attach("/b", new Maplet())
>>>                 .attach("/c", 
>>>                         new Restlet()
>>>                 )
>>>         )
>>> )
>>
>>Yep, I thought about the same approach but it has the disadvantage
>>that you cannot easily comment out a section and you have to keep
>>track about the braces (or the IDE does it).
>>I am very happy that I could do the following:
>>
>>  builder
>>         .attach(SomeChainlet(....))
>>           .attach(Someother)
>>
>>And if I don't need a chainlet or maplet I can easily comment it out
>>without breaking the flow.
>>           
>>  builder
>>//         .attach(SomeChainlet(....))
>>           .attach(Someother)
>>
>>
>>           
>>[...]
>>> Each ")" above would correspond to the .back(1) in Lars solution, I
>>> guess. The generic back(?) seems more flexible and I would interested in
>>> knowing what kind of scenarios does it enable.
>>
>>I use it just to save some .back().back() chains if I've to jump to a
>>higher level. It is build in because I am lazy. ;)
>>
>>Best regards,
>>Lars
>>-- 
>>http://semagia.com
>>
>
>
>
>-- 
>
>
>



-- 


Reply via email to