On Wednesday, 3 October 2012 at 21:40:06 UTC, Timon Gehr wrote:
On 10/03/2012 05:59 PM, renoX wrote:
I have some mixed feeling about component programming: add in all the examples the requirement to give the context (line number for example) where something happened (either a match or an error) and suddendly
component programming becomes much more "tricky"!!


Just zip the range with a range of context information, just as would be done with an explicit loop.

Yes, of course it's possible, but when you add filename, line numbers, column numbers (etc) the beautiful pipeline looks much less pretty.. Worse: each time you want to add some context, you have to modify the pipeline in a non-local way: take a -> b -> c -> d: you want to have more information in d from a's context, b and c must be modified to propagate the context..

When you have objects which encapsulate contexts, this becomes less an issue..

renoX


So for me component programming looks good on paper, but not so much in
the real world..

renoX


Reply via email to