Thread overview | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
October 24, 2005 DMD 0.137 release | ||||
---|---|---|---|---|
| ||||
A couple of oft-requested features. http://www.digitalmars.com/d/changelog.html |
October 24, 2005 Re: DMD 0.137 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | In article <djjpa0$1o9n$2@digitaldaemon.com>, Walter Bright says... > >A couple of oft-requested features. Very nice! Sean |
October 24, 2005 Re: DMD 0.137 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Mon, 24 Oct 2005 19:02:00 -0400, Walter Bright <newshound@digitalmars.com> wrote: > A couple of oft-requested features. > > http://www.digitalmars.com/d/changelog.html > On http://www.digitalmars.com/d/declaration.html#AutoDeclaration that anchor does not seem to exist and I can not find the word inference. |
October 24, 2005 Re: DMD 0.137 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | In article <djjpa0$1o9n$2@digitaldaemon.com>, Walter Bright says... > >A couple of oft-requested features. I'm running into an odd error with typeof. I have this line in std.c.stddef: alias typeof(int.sizeof) size_t; and have this in object.d: public import std.c.stddef; When I try to compile stddef I get this error: C:\bin\dmd\src\ares\std\c>dmd -c stddef.d stddef.d(10): size of type typeof(4) is not known When I move the alias into object.d however, the error goes away. This pattern worked fine when I was using version blocks to define the size_t alias, so it's something to do with typeof. Any ideas? Sean |
October 25, 2005 Re: DMD 0.137 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vathix |
"Vathix" <chris@dprogramming.com> wrote in message news:op.sy6bxz0dl2lsvj@esi...
> On http://www.digitalmars.com/d/declaration.html#AutoDeclaration that anchor does not seem to exist and I can not find the word inference.
I hadn't posted the updated doc yet. It's there now.
|
October 25, 2005 Re: DMD 0.137 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> "Vathix" <chris@dprogramming.com> wrote in message
> news:op.sy6bxz0dl2lsvj@esi...
>
>>On http://www.digitalmars.com/d/declaration.html#AutoDeclaration that
>>anchor does not seem to exist and I can not find the word inference.
>
>
> I hadn't posted the updated doc yet. It's there now.
Cool, Implicit Type Inference!
However, I think that the problems with overloading the "auto" keyword to declare it are made obvious by the special case you had to define with classes. That's sure to bite people with strange, subtle bugs. Plus, such special cases make templates harder to write. Say you were defining a mixin where it would be useful to have both:
template Foo(alias func) {
auto foo = func(); // drat, can't use both implicit types and auto
}
void main() {
Foo(myFunc);
...stuff...
}
|
October 25, 2005 Re: DMD 0.137 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Russ Lewis | Russ Lewis wrote: > > Cool, Implicit Type Inference! > I agree. > However, I think that the problems with overloading the "auto" keyword to declare it are made obvious by the special case you had to define with classes. That's sure to bite people with strange, subtle bugs. Plus, such special cases make templates harder to write. Say you were defining a mixin where it would be useful to have both: > > template Foo(alias func) { > auto foo = func(); // drat, can't use both implicit types and auto > } > > void main() { > Foo(myFunc); > ...stuff... > } And i also agree. This way you cannot have auto objects with type inference and it is a problem. Couldn't another keywoard be added for type inference? Many have been suggested (autotype, var, ...). |
October 25, 2005 Re: DMD 0.137 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Yay! "extern(linkage) for nested functions now works." Thanks, Walter! I thought you had all but forgotten this one. - John "Walter Bright" <newshound@digitalmars.com> wrote in message news:djjpa0$1o9n$2@digitaldaemon.com... >A couple of oft-requested features. > > http://www.digitalmars.com/d/changelog.html > > > |
October 25, 2005 Re: DMD 0.137 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ivan Senji | "Ivan Senji" <ivan.senji_REMOVE_@_THIS__gmail.com> wrote in message news:djlqvi$2tn$1@digitaldaemon.com... > And i also agree. This way you cannot have auto objects with type inference and it is a problem. Couldn't another keywoard be added for type inference? Many have been suggested (autotype, var, ...). I've tried to stay away from 'var', it reminds me of Pascal too much <g>. Anyhow, I've thought about this problem a lot, and there is an answer for it that is simple and consistent. It's just a bit of work to implement :-(. |
October 25, 2005 Re: DMD 0.137 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Reimer | "John Reimer" <terminal.node@gmail.com> wrote in message news:djlrjv$3pl$1@digitaldaemon.com... > Yay! > > "extern(linkage) for nested functions now works." > > Thanks, Walter! I thought you had all but forgotten this one. I just kept getting distracted onto other things. Sorry it took so long. |
Copyright © 1999-2021 by the D Language Foundation