Re: Higher-order functions?

2012-04-11 Thread Jonas H.
Wow, thanks for all the answers! Seems to be a great community here. What do you guys think about adding the term "anonymous functions" to the frontpage and features page? I think that one's a lot more comman than "delegates" (even if it's not exactly the same thing).

Higher-order functions?

2012-04-10 Thread Jonas H.
Hi everyone, does D have any runtime higher-order function facilities? (I'm not talking about templates.) More specifically, is something like this possible? (That's how I'd do it in Python) car_prices = map(Car.get_price, list_of_cars) car = new Car foobar(car.get_price) Thanks Jonas

Re: Input from a newbie

2012-04-09 Thread Jonas H.
On 04/09/2012 07:22 PM, Andrej Mitrovic wrote: I think most mentions of printf should just be removed from the dpl docs except maybe a few special places. People (or rather C++ refugees) seem to expect D to be a syntax sugared version of C++, but this myth has to be busted. I don't think that's

Re: Input from a newbie

2012-04-09 Thread Jonas H.
On 04/09/2012 05:39 PM, Andrej Mitrovic wrote: I don't think the compiler can warn about this. Isn't printf one of those unsafe C variadic functions? Someone correct me if I'm wrong. The GCC C compiler proves you wrong :) They have warnings. I guess it's a hack (because printf really doesn't b