On 2011-02-23 13:13, bearophile wrote:
Jacob Carlborg:

def sierpinskiCarpets(n: Int) = (Iterator.iterate(List("#"))(nextCarpet) drop n 
next) foreach println

Again Scala shines with its beautiful lambdas compared to Ds ugly string
version.

In software engineering there aren't many free things. For some of the Scala 
features you have to pay with a higher amount of memory used by the Java 
virtual machine, and with the compilation time of the function optimizations 
(and type system management) done by the Scala compiler. There is a faster 
Scala compiler, named fsc, but I don't know how fast it is for larger projects.

Bye,
bearophile

Ok, I see now that my answer can be misinterpreted. When I wrote the answer I was actually referring to the lambda syntax used in the "map" function. This is just syntax sugar that D could use as well with no overhead.

--
/Jacob Carlborg

Reply via email to