Not the last breakage (Was: TLBB: The Last Big Breakage)

Benjamin Thaut code at benjamin-thaut.de
Sun Mar 16 06:27:06 PDT 2014


Am 16.03.2014 13:44, schrieb bearophile:
> Another breaking change could be the deprecation of the now nearly
> useless opApply() (only std.array.array works with it) and replacing it
> with a nice external iterator D syntax sugar to define a forward iterator:
>
> http://journal.stuffwithstuff.com/2013/01/13/iteration-inside-and-out/
>
> Another smaller breaking change could be the removal of some usages of
> the comma operator.
>
> Another breaking change are related to changes to object.
>
> Bye,
> bearophile

Wait what?

I find opApply really usefull, especially because it passes a lambda in, 
and you have control over the program flow within opApply. This for 
example makes it possible to mark a container as "is currently iterated 
over" so you can assert when modifications are made to the container 
while it is currently used for iteration. In fact all of my custom 
container classes rely on opApply, so I do not agree at all, that it is 
useless. Also, as far as I know, std.paralellism heavily relies on 
opApply to actually be able to parallelise foreach loops.

Could you please explain in a bit more detail why you think opApply 
should be deprecated?

Kind Regards
Benjamin Thaut


More information about the Digitalmars-d mailing list