<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>I think I would like to have something in the middle of strict and loose semantics. I would like that functions marked with @property have to be called like a field:</div><div><br></div><div>auto bar = foo.field;</div><div>foo.field = 3;</div><div><br></div><div>But functions not marked with @property still can be called without the parentheses:</div><div><br></div><div>foo.bar();</div><div>foo.bar;</div><br><div><div>On 21 apr 2011, at 16:09, David Simcha wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">As I've said before, we really need to decide whether @property has loose or strict semantics. Loose semantics means that non-@property functions would still be callable without (), etc but @property functions wouldn't be allowed to have ()s. Frankly, I hate @property, want to to have as little effect as possible, like the flexibility of being able to call the same function both ways, and would have a lot of code break if this were taken away, so my vote is loose semantics.<br>
<br><div class="gmail_quote">On Thu, Apr 21, 2011 at 9:24 AM, Michel Fortin <span dir="ltr"><<a href="mailto:michel.fortin@michelf.com">michel.fortin@michelf.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Le 2011-04-21 à 6:48, Torarin a écrit :<br>
<div class="im"><br>
> Dmd has a bug that causes the @property attribute to be disregarded in<br>
> functions that return auto.<br>
<br>
</div>Indeed. I think I have a fix for that in the "@property" branch of my DMD fork on github. Perhaps I should make a pull request from that.<br>
<br>
Actually, I could make a pull request for the entire "@property" branch, it shouldn't impact things much as enforcement of @property is only done if you add the command line switch -property. Would that make sense?<br>
<div class="im"><br>
--<br>
Michel Fortin<br>
<a href="mailto:michel.fortin@michelf.com">michel.fortin@michelf.com</a><br>
<a href="http://michelf.com/" target="_blank">http://michelf.com/</a><br>
<br>
<br>
<br>
_______________________________________________<br>
</div><div><div></div><div class="h5">phobos mailing list<br>
<a href="mailto:phobos@puremagic.com">phobos@puremagic.com</a><br>
<a href="http://lists.puremagic.com/mailman/listinfo/phobos" target="_blank">http://lists.puremagic.com/mailman/listinfo/phobos</a><br>
</div></div></blockquote></div><br>
_______________________________________________<br>phobos mailing list<br><a href="mailto:phobos@puremagic.com">phobos@puremagic.com</a><br>http://lists.puremagic.com/mailman/listinfo/phobos</blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">-- <br>/Jacob Carlborg</span>
</div>
<br></body></html>