On Sat, 16 Jan 2010 00:58:36 -0600, Andrei Alexandrescu wrote:
> I'd also like to see other keywords (nothrow, pure, override come to
> mind) transferred into the attribute space.
I'd welcome if that happens. My personal favorite is "align", it is
common, hard to replace word when one works with
On 01/16/2010 01:46 AM, Leandro Lucarella wrote:
Ali Çehreli, el 15 de enero a las 16:01 me escribiste:
http://www.digitalmars.com/d/2.0/declaration.html#AutoDeclaration
It is news to me that the following works without 'auto':
struct S
{
int i;
this(int i)
{
this.i =
On 15/01/10 00:36, Leandro Lucarella wrote:
Yes, I can read, but I wondered what's the point on making a function
non-callable. It's absolutely contradictory! :)
Other than the no-copy idiom for structs, I'd find it useful in the
following situation:
@disable void foo1() { }
int foo2( i
On 15/01/10 08:25, bearophile wrote:
int foo3(int x, private int depth=0) {
...
foo3(x+1); // OK
foo3(x, depth + 1); // OK
...
}
void main() {
int r = foo3(5); // OK
int r = foo3(5, 1); // Error
int r = foo3(5, 0); // Error
}
Does this not achieve the same effect? (OK, the
Robert Clipsham wrote:
> On 15/01/10 08:25, bearophile wrote:
>> int foo3(int x, private int depth=0) {
>>...
>>foo3(x+1); // OK
>>foo3(x, depth + 1); // OK
>>...
>> }
>> void main() {
>>int r = foo3(5); // OK
>>int r = foo3(5, 1); // Error
>>int r = foo3(5, 0); // Error
Pelle Månsson wrote:
On 01/16/2010 01:46 AM, Leandro Lucarella wrote:
Ali Çehreli, el 15 de enero a las 16:01 me escribiste:
http://www.digitalmars.com/d/2.0/declaration.html#AutoDeclaration
It is news to me that the following works without 'auto':
struct S
{
int i;
this(int i)
Pelle Månsson, el 16 de enero a las 14:00 me escribiste:
> >I don't think so. auto means in D the same that in C/C++, the difference
> >is that D do type inference when a *storage class* is given. const,
> >static, immutable, shared are other storage classs, so when you used
> >them, you can infer
Michal Minich wrote:
On Sat, 16 Jan 2010 00:58:36 -0600, Andrei Alexandrescu wrote:
I'd also like to see other keywords (nothrow, pure, override come to
mind) transferred into the attribute space.
I'd welcome if that happens. My personal favorite is "align", it is
common, hard to replace wor
Michal Minich wrote:
> On Sat, 16 Jan 2010 00:58:36 -0600, Andrei Alexandrescu wrote:
>
>> I'd also like to see other keywords (nothrow, pure, override come to
>> mind) transferred into the attribute space.
>
> I'd welcome if that happens. My personal favorite is "align", it is
> common, hard to
Ary Borenszweig wrote:
> Why not read the specification?
>
> http://www.digitalmars.com/d/2.0/attribute.html#auto
>
> "The auto attribute is used when there are no other attributes and type
> inference is desired."
>
> So basically type inference is always done except when you specify the type.
Leandro Lucarella wrote:
I think auto just means inferred type.
That seems to be the case then... So Ali Çehreli was right and I was
wrong.
Oh no... I had already adopted your thinking. :)
I still like my logic better, I will keep thinking that auto is a real
storage class and ignore this
On 16/01/10 14:39, "Jérôme M. Berger" wrote:
Two words: stack overflow. Even if you fix your function to avoid
the stack overflow, this would fail in multithread environments (or
be too slow if depth is made thread local).
Jerome
Ah, thanks :)
Seems in my simple single
Making money off of the toils of many. To be lost? I assure you at least I
am watching. "make money off of the masses"... surely you are a crime
against humanity. M.O.: a penny of oppression, no one will notice. Take your
"tea" (surely it happened before that), and SHOVE IT UP YOUR ASS.
13 matches
Mail list logo