with a
public member.
Thanks for the detailed explanation. I guess the wording of the
warning seems strange to me, in that it recommends not to use
property functions; but, in actuality (and regardless?), these
functions are used a lot (even in the standard library; at least
from what I&
On Monday, 17 May 2021 at 14:56:21 UTC, Steven Schveighoffer
wrote:
It used to be required, but we removed that requirement a long
time ago.
yeah i remember ElementType required it last time i checked but
that was a while ago
indeed it is all fixed now
On 5/16/21 11:47 AM, Adam D. Ruppe wrote:
On Sunday, 16 May 2021 at 15:12:25 UTC, Nick wrote:
Is this warning still valid?
The @property thing doesn't do much. All it does is change
typeof(a.prop) from function over to the return value of the function.
(Which actually makes it required for t
On Sunday, 16 May 2021 at 15:47:55 UTC, Adam D. Ruppe wrote:
On Sunday, 16 May 2021 at 15:12:25 UTC, Nick wrote:
Is this warning still valid?
The @property thing doesn't do much. All it does is change
typeof(a.prop) from function over to the return value of the
function. (Which actually make
On Sunday, 16 May 2021 at 15:12:25 UTC, Nick wrote:
Is this warning still valid?
The @property thing doesn't do much. All it does is change
typeof(a.prop) from function over to the return value of the
function. (Which actually makes it required for the range empty
and front things!)
But si
The [Property
Functions](https://dlang.org/spec/function.html#property-functions) documentation reads:
WARNING: The definition and usefulness of property functions is
being reviewed, and the implementation is currently incomplete.
Using property functions is not recommended until the
ntrol how _bar is manipulated.
I've lost the ability to use the with statement, which is a minor
inconvenience. Is there a specific reason why with() should not be
allowed to be used with property functions?
This works fine:
immutable Foo foo;
with (foo)
{
}
So I don't see why it sh
to use the with statement, which is a minor
inconvenience. Is there a specific reason why with() should not be
allowed to be used with property functions?
This works fine:
immutable Foo foo;
with (foo)
{
}
So I don't see why it shouldn't work on property functions?
> It will be fixed at some point, but it hasn't been yet.
Oh cool, all right; thanks!
%u wrote:
Hi,
I was wondering, why are we allowed to omit parentheses when calling
functions
with no arguments, when they are not @properties? Is there a good reason
for
relaxing the language rules like this?
This behavior is deprecated, but other features have had a higher priority
tha
ded so that it could be better controlled. However, while @property has been
added, the compiler has yet to be changed to enforce that @property functions
are called without parens and that non-@property functions are called with
them.
It will be fixed at some point, but it hasn't been yet.
- Jonathan M Davis
Hi,
I was wondering, why are we allowed to omit parentheses when calling functions
with no arguments, when they are not @properties? Is there a good reason for
relaxing the language rules like this?
Thanks!
12 matches
Mail list logo