Re: We need a way to make functions pure and/or nothrow based on the purity and/or nothrowability of the functions that they call

2010-11-14 Thread Tomasz Sowiński
== Quote from Jonathan M Davis (jmdavisp...@gmx.com)'s article > [snip] > We really need to add a way to have a function marked as nothrow and/or pure > based on whether the functions that it calls are nothrow and/or pure. Whether > that should require listing the functions that need to be pure and

SCHEDULED for deprecation

2009-05-07 Thread Tomasz Sowiński
This phrase gave me an idea for a small feat: deprecated(2009-4-19) void foo(); Compiling references to the deprecated declaration *before* the deprecation date would result in a *warning*. Compiling the deprecated declaration OR any reference to it *after* the date would result in an *error*.

Re: Contract programming syntax

2009-04-09 Thread Tomasz Sowiński
Jarrett Billingsley Wrote: > OK, then what about: > > void foo() > in { ... } > out { ... } > { ... } > > the 'body' keyword is completely arbitrary. There is no ambiguity here. > > Also, I almost never use contracts because of their verbosity. It's > much shorter - and functionally equivalen

Re: The Sweet With

2009-03-10 Thread Tomasz Sowiński
Sergey Gromov Wrote: > Thu, 05 Mar 2009 07:38:23 -0500, Tomasz Sowiński wrote: > > > Walter Bright Wrote: > > > >> It looks nice, but has a subtle and disastrous problem. In D, arguments > >> are fully resolved *before* overloading is done. If some of the &

Re: The Sweet With

2009-03-05 Thread Tomasz Sowiński
Walter Bright Wrote: > It looks nice, but has a subtle and disastrous problem. In D, arguments > are fully resolved *before* overloading is done. If some of the > overloads have with declarations, then there's a nightmarish problem of > trying to mix overloading and argument resolution together

The Sweet With

2009-03-03 Thread Tomasz Sowiński
Ideas for features based on the with. The with can make calling functions with enum arguments sexier. So instead of: auto d = dirEntries(".", SpanMode.breadth); you could say: auto d = dirEntries(".", breadth); by declaring the function as: dirEntries(string path, with SpanMode mode);// "wit