To help LDC/GDC

Timon Gehr timon.gehr at gmx.ch
Tue Apr 9 03:24:44 PDT 2013


On 04/09/2013 10:33 AM, Manu wrote:
> ...
>
> How can 'weak pure' reasonably be called any kind of 'pure'? It's not
> pure at all. The function returns a completely different result when
> called twice. That's the definition of not-pure.

(Actually this is not the definition of impure.)

In D, 'pure' forbids reading or writing of mutable static variables.

> I suggest that no D language newbie would ever reasonably expect that
> behaviour.

Sure. Many keyword choices in D are unhelpful for newbies, or 
technically wrong.

enum   -> const
catch  -> handle
do     -> repeat
for    -> (no suggestion)
const  -> readonly
inout  -> (no suggestion)
lazy   -> byname
pure   -> (no suggestion)
static -> (no suggestion)
struct -> (no suggestion)
throw  -> raise / signal
union  -> (no suggestion)



More information about the Digitalmars-d mailing list