October 05, 2009
Jacob Carlborg, el  5 de octubre a las 16:08 me escribiste:
> >>>>2. A while ago, (I can't find the post, it may have been on reddit) you mentioned that you were going to add property notation. Is that still going to happen? I'm really looking forward to that, and if not, is there a reason?
> >>>
> >>>There are some traces of it in the code: http://www.dsource.org/projects/dmd/changeset/195 search for "property".
> >>>
> >>>>-Steve
> >>>
> >>
> >>int bar() @property
> >>{
> >>return 42;
> >>}
> >>
> >>writeln(bar);
> >>
> >>Yay! :)
> >
> >Cool :)
> >
> >Unfortunately, this still compiles :(
> >
> >int bar()
> >{
> >return 42;
> >}
> >
> >writeln("%d", bar);
> >
> >And this too:
> >
> >int bar() @property
> >{
> >return 42;
> >}
> >
> >writeln("%d", bar());
> >
> >So it appears that @property is a noop for now, but is valid syntax.
> >
> >Also interesting from this revelation is that attributes are coming :D
> 
> I just hope that they also will be user defined.

Ok, this is getting interesting... 8-)

-- 
Leandro Lucarella (AKA luca)                      http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
Dentro de 30 aƱos Argentina va a ser un gran supermercado con 15
changuitos, porque esa va a ser la cantidad de gente que va a poder
comprar algo.
	-- Sidharta Wiki
October 05, 2009
Steven Schveighoffer:
> Also interesting from this revelation is that attributes are coming :D

Despite all, it seems sometimes Walter listens :-)

Maybe this syntax will be allowed (attribute before instead of after function name):
@property int bar() {...

Bye,
bearophile
October 05, 2009
Nick Sabalausky wrote:

> "Walter Bright" <newshound1@digitalmars.com> wrote in message news:hac8nb$26j6$1@digitalmars.com...
>> Another OSX 10.5 release :-)
>>
>> Anyhow, this should work with gdb now, and has contract inheritance
>> (finally).
>>
>> http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.048.zip
>>
>>
>> http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.033.zip
>>
>> Many thanks to the numerous people who contributed to this update.
> 
> "Compiler now detects some cases of illegal null dereferencing when compiled with -O"
> 
> A bug-detection feature that's turned on with -O? I assume that's just a temporary situation and is related to either it currently being detected by the optimizer and the feature maybe being in a "trial" phase? Or maybe just a typo? ;)

Somewhere in the huge thread(s) on the topic Walter mentioned the optimizer does (some of) the required flow analysis, so presumably it needs to run in order for this to work.
October 05, 2009
Tim Matthews wrote:
> 3301 didn't make this release. Is there outstanding problems with Rainer's patch? Thanks anyway.

I just need more time to study that one.
October 05, 2009
Nick Sabalausky wrote:
> "Compiler now detects some cases of illegal null dereferencing when compiled with -O"
> 
> A bug-detection feature that's turned on with -O? I assume that's just a temporary situation and is related to either it currently being detected by the optimizer and the feature maybe being in a "trial" phase? Or maybe just a typo? ;) 

No, it's deliberate. Turns out, in order for it to work reliably and not give false positives, it needs the full attention of the optimizer. Otherwise, you get false positives like:

  int* p = null;
  ...
  if (p)
     *p = 7;

October 05, 2009
Steven Schveighoffer wrote:
> 1. "The result type of the typeid(type) is now the most derived TypeInfo class, rather than the TypeInfo base class"  Why can't this be propogated to D1?  I can't imagine code that depends on the return value being typed as TypeInfo that would not simply just work with the most derived return type...

Changing the spec constantly for D1 makes it not stable.

> 2. A while ago, (I can't find the post, it may have been on reddit) you mentioned that you were going to add property notation.  Is that still going to happen?  I'm really looking forward to that, and if not, is there a reason?

It's high on the list, it's just that there were some important improvements that I felt should be released now rather than holding them back.
October 05, 2009
Denis Koroskin wrote:
> Yay! :)

It's only half-implemented. Don't use it yet :-(
October 05, 2009
Nick Sabalausky wrote:
> I see, but is that just a temporary situation? I'm fine with it for now, but optimizers are known for conflicting with debugging, so in the long run I'd hate to have to split my debug builds into separate "maximum static analysis" vs "debuggable" builds (I already had been forced to split my debug builds into separate "debug with warnings" and "debug without warnings" builds, which was a real pain in the ass until I started hacking in that "optionally treat warnings as warnings" patch...but I've had to temporarily abandon use of even that since I'm working on a multi-build-version tool, used by some projects I've released, and none of those should have to be reliant on a feature that only exists in a custom build of DMD).

Just build your releases with -O.
October 05, 2009
bearophile wrote:
> Steven Schveighoffer:
>> Also interesting from this revelation is that attributes are coming :D
> 
> Despite all, it seems sometimes Walter listens :-)

Wow, indeed he does. :-D
October 06, 2009
On Mon, 05 Oct 2009 10:54:22 +0300, Walter Bright <newshound1@digitalmars.com> wrote:

> gdb stack trace should work now

Could someone please elaborate on this a bit (what exactly was changed), or at least point to the respective SVN revision or something?

-- 
Best regards,
 Vladimir                          mailto:thecybershadow@gmail.com