Recommendation: "functional" keyword

Tomek Sowiński just at ask.me
Sun Jan 9 14:14:41 PST 2011


Sean Eskapp napisał:

> It's a programmer contract, nothing more. It forces the code to be functional, not
> procedural. Just like const and @safe are simply programmer contracts,

Immutably (strongly) pure (pure + all arguments immutable) functions break D onto functional grounds.

> functional would mean no explicit stack allocation,

That's.. ehem.. quite limiting. :) (you probably meant heap)

> except that allocated in called functions.

Like Simen said, this is a matter of whether @noheap is useful enough to be included or not.

-- 
Tomek



More information about the Digitalmars-d mailing list