On Saturday, 15 March 2014 at 07:36:12 UTC, Walter Bright wrote:
On 3/14/2014 9:02 PM, Manu wrote:
That said, function inlining is perhaps the single most important API level performance detail, and especially true in OO code (which advocates
accessors/properties).

I find it peculiar to desire a 'final accessor'. After all,

    class C {
        int x;
final int getX() { return x; } <= what the heck is this function for?
    }

The only reason to have an accessor function is so it can be virtual.

Um... Read only attributes? Forgot the discussions about @property ?

This makes sense to me:
class C
{
    private int _x;

    ///Gets x
    final int x() @property { return x; }
}

Reply via email to