[phobos] Time to get ready for the next release
Steve Schveighoffer
schveiguy at yahoo.com
Thu Apr 21 10:44:58 PDT 2011
I've proposed in the past that functions which have no arguments and return void could be callable without parentheses, as they cannot be mistaken for properties.
I think we all agree that non- at property functions which take a single parameter should not be callable in property form.
Functions that are not properties which return a value should be required to have parentheses to distinguish them from properties.
The above is all consistent with TDPL as far as I know.
-Steve
>________________________________
>From: David Simcha <dsimcha at gmail.com>
>To: Discuss the phobos library for D <phobos at puremagic.com>
>Sent: Thursday, April 21, 2011 10:09 AM
>Subject: Re: [phobos] Time to get ready for the next release
>
>
>As I've said before, we really need to decide whether @property has loose or strict semantics. Loose semantics means that non- at 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.
>
>
>On Thu, Apr 21, 2011 at 9:24 AM, Michel Fortin <michel.fortin at michelf.com> wrote:
>
>Le 2011-04-21 à 6:48, Torarin a écrit :
>>
>>
>>> Dmd has a bug that causes the @property attribute to be disregarded in
>>> functions that return auto.
>>
>>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.
>>
>>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?
>>
>>
>>--
>>Michel Fortin
>>michel.fortin at michelf.com
>>http://michelf.com/
>>
>>
>>
>>_______________________________________________
>>
>>phobos mailing list
>>phobos at puremagic.com
>>http://lists.puremagic.com/mailman/listinfo/phobos
>>
>
>_______________________________________________
>phobos mailing list
>phobos at puremagic.com
>http://lists.puremagic.com/mailman/listinfo/phobos
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/phobos/attachments/20110421/e78bd37b/attachment-0001.html>
More information about the phobos
mailing list