I was wondering what the general consesus was (if there is one) on whether
>> it's
>> valuable to always put module declarations in each module.
>>
>
> I can't think of any particularly strong reasons to have it or not to have
>> it.
>> My first reaction is to just always use it, but thinking abou
Hi,
does any know where to get style sheets for a2ps for D.
Many thanks,
Helmut.
On Wed, 14 Jul 2010 23:22:20 -0400, Heywood Floyd
wrote:
Hi!
Breakfast toast: Is there any chance a) and b) below are identical in
what they do?
auto mutex = new Mutex();
auto cond = new Condition(mutex);
// a)
synchronized(mutex){
cond.wait();
}
// b)
mutex.lock();
cond.wait();
On Wed, 14 Jul 2010 16:57:13 -0400, Heywood Floyd wrote:
> Lars T. Kyllingstad Wrote:
>
>
>> But then arrays would be different from all other types! If you have
>> an array of 3 Ts, that is written T[3], regardless of what T is. Now
>> consider these two cases:
>>
>>A. T is an int. Then
Jonathan M Davis:
> [5](int) const a;
Go language uses something similar, and I find it a bit better than D syntax.
Bye,
bearophile
Steven Schveighoffer Wrote:
> On Wed, 14 Jul 2010 23:22:20 -0400, Heywood Floyd
> wrote:
>
> > Hi!
> >
> > Breakfast toast: Is there any chance a) and b) below are identical in
> > what they do?
> >
> >
> > auto mutex = new Mutex();
> > auto cond = new Condition(mutex);
> >
> > // a)
> > syn
On Thu, 15 Jul 2010 00:22:34 +0200, Jonathan M Davis
wrote:
I was wondering what the general consesus was (if there is one) on
whether it's
valuable to always put module declarations in each module.
Obviously, if you need the module to have a name other than the file
name, then
you need
On 15.07.2010 21:59, Rory McGuire wrote:
From what I remember in TDPL:
Can be used to rename a module if you have it in a different directory
structure than how you use it. E.g. implementation and "headers" in
separate folders.
If you use *.di files (headers), you would normally just keep the
On Thu, 15 Jul 2010 23:08:07 +0200, torhu wrote:
On 15.07.2010 21:59, Rory McGuire wrote:
From what I remember in TDPL:
Can be used to rename a module if you have it in a different directory
structure than how you use it. E.g. implementation and "headers" in
separate folders.
If you use *.
On 15.07.2010 23:28, Rory McGuire wrote:
On Thu, 15 Jul 2010 23:08:07 +0200, torhu wrote:
On 15.07.2010 21:59, Rory McGuire wrote:
From what I remember in TDPL:
Can be used to rename a module if you have it in a different directory
structure than how you use it. E.g. implementation and
So having got a collectors' edition TDPL, I though I'd have a try at
writing some concurrent code. The idea was a worker thread(s) would do
some work and write the results to some immutable objects. These would
get passed to an indexer thread that would do neat stuff like indexing
the reference
On 02/07/10 15:18, Heywood Floyd wrote:
On Jul 2, 2010, at 15:34 , Steven Schveighoffer wrote:
On Fri, 02 Jul 2010 09:32:39 -0400, Steven Schveighoffer
wrote:
On Fri, 02 Jul 2010 09:24:20 -0400, Heywood Floyd wrote:
Good day!
Consider
// - - - -
class Foo{}
auto one = new Foo();
aut
On Thursday, July 15, 2010 17:40:26 Gareth Charnock wrote:
> So having got a collectors' edition TDPL, I though I'd have a try at
> writing some concurrent code. The idea was a worker thread(s) would do
> some work and write the results to some immutable objects. These would
> get passed to an inde
On 16/07/10 02:08, Jonathan M Davis wrote:
On Thursday, July 15, 2010 17:40:26 Gareth Charnock wrote:
So having got a collectors' edition TDPL, I though I'd have a try at
writing some concurrent code. The idea was a worker thread(s) would do
some work and write the results to some immutable obje
Jonathan M Davis:
> It's not terribly pretty, but apparently no one could come up with a
> satistfactory way of doing it in the language itself given the syntax for
> references. So, Rebindable!(T) is the solution.
A helper function can help:
import std.stdio, std.typecons, std.traits;
templat
== Quote from strtr (st...@sp.am)'s article
> == Quote from bearophile (bearophileh...@lycos.com)'s article
> > strtr:
> > > Not that the memory is really significant compared to the rest of my
> > > program,
> > > but I have a few fairly large arrays I use only in compile time and I was
> > > won
Jonathan M Davis:
> Personally, I'd advise you to just use dynamic arrays unless you do
> some profiling and find that a static array is better in a particular case.
To program you need a less naive view. I sometimes start using dynamic arrays
everywhere because they are handy, then I profile cod
strtr:
> Too busy reading TDPL? ;)
I have not answered because my answer is not useful: I am sure that constant is
present in the binary, you probably need LDC with Link-Time Optimization
activated to remove them.
> btw. how long until runtime mixins? :D
D compiler contains an interpreter. It
On Thursday 15 July 2010 22:20:17 bearophile wrote:
> Jonathan M Davis:
> > Personally, I'd advise you to just use dynamic arrays unless you do
> > some profiling and find that a static array is better in a particular
> > case.
>
> To program you need a less naive view. I sometimes start using dyn
19 matches
Mail list logo