Congratulations to the D Team!

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Jul 11 11:17:01 PDT 2012


On 7/11/12 2:03 PM, Timon Gehr wrote:
> I think they should be pure as much as I think they should be const.
>
> The reasoning is analogous for both.
>
> We have immutable class instances that want to provide the methods =>
> make them const.
>
> We have pure functions that want to provide the methods => make them pure.
>
> This reasoning is not taking into account the whole picture because
>
> We have implementations of those methods that want to use non-const
> methods in their implementation. (eg. database connection)
>
> We have implementation of those methods that want to use non-pure
> methods in their implementation (eg. database connection, logging)

The essential difference is there's no "pure" object, so there's no 
motivation to plant "pure" on its methods.

Andrei


More information about the Digitalmars-d mailing list