Re: Call diagram generation

2010-01-05 Thread BCS
Hello Strt, Lutger Wrote: On 01/03/2010 04:31 AM, Strt wrote: How can I generate some sort of call diagram from my D code? you can compile with (dmd) -profile and run the executable. This produces a file called trace.log which contains timings for each function and a call graph. It doesn't

Re: Are scope class useful ?

2010-01-05 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 #ponce wrote: > When I started D, it was possible to define a scope class like this. > > scope class Something > { > // blah > } > > An instance declaration would then _require_ the scope storage class. > > > { > scope Something myVar; >//

Are scope class useful ?

2010-01-05 Thread #ponce
When I started D, it was possible to define a scope class like this. scope class Something { // blah } An instance declaration would then _require_ the scope storage class. { scope Something myVar; // do something with Something } Is there a use case for such a feature.?

Re: Are named variadic arguments possible?

2010-01-05 Thread downs
Alex wrote: > Is it possible, using templates, tuples, or some other mechanism, to > implement named variadic arguments in D? > > For example, I'd like to be able to do something like... > foo( 2, &bar, age : 10, status : "down"); > > and so forth. Yes, with a small hack. typedef int age_type;

Re: Are named variadic arguments possible?

2010-01-05 Thread bearophile
> Do you need high performance for this code? > If not, what about using an associative array of Variant[string] as third > argument? It's not a nice solution. It's not a nice solution, but that's essentially what Python does in such situation: def foo(x, y, **kwds): # here kwds is a dict of s

Re: Are named variadic arguments possible?

2010-01-05 Thread bearophile
Alex Wrote: > Is it possible, using templates, tuples, or some other mechanism, to > implement named variadic arguments in D? Do you need high performance for this code? If not, what about using an associative array of Variant[string] as third argument? It's not a nice solution. Bye, bearophil