Matter of style, and cast()

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Mon Aug 5 06:46:13 PDT 2013


On 08/05/2013 03:01 PM, bearophile wrote:
> 2) The code should contain as few cast() as possible. [*]

What about to!() ... ?  Is it possible to gain the performance of cast() while
using to!() ... ?

> 4) for/foreach/while loops are not evil, but it's better to use map/filter/zip
> where possible and where performance allows them.

Your remarks about performance here are apt.  Maps, filters etc. make for very
elegant code but as we discussed, there are serious performance issues.


More information about the Digitalmars-d-learn mailing list