Should we have an Unimplemented Attribute?

Iain Buclaw ibuclaw at ubuntu.com
Wed Feb 2 16:33:40 PST 2011


== Quote from Andrej Mitrovic (andrej.mitrovich at gmail.com)'s article
> On 2/3/11, Jonathan M Davis <jmdavisProg at gmx.com> wrote:
> >
> > Usually the thing to do would be to either comment them out or put an
> > assert(0)
> Can't do that with classes and struct.
> >  Regardless, I question the wisdom in adding something into the
> > language which _encourages_ you to leave in unfinished code.
> >
> My use case was protection for the user from using unfinished code by
> accident and as a reminder on how much work you're left to do as a
> library writer. But you might have a fair point here.

>From a library maintainer's POV, it may be wise to use an internal throw function.

>From a developers POV, there's nothing that assert(! unimplementated) or
assert(false) can't do as a way to lay mines around checkpoints that you're
uncertain how to set off. :)

Both do not require any special language feature to function.

Regards


More information about the Digitalmars-d mailing list