On 01/09/2011 04:31 PM, Sean Eskapp wrote:
That's.. ehem.. quite limiting. :) (you probably meant heap)
I meant what I said, and I said what I meant. Stack allocated implicitly would
be
fine, but explicit stack allocation, like declaring variables, doesn't happen in
purely functional languages
On Sunday 09 January 2011 14:31:11 Sean Eskapp wrote:
> >That's.. ehem.. quite limiting. :) (you probably meant heap)
>
> I meant what I said, and I said what I meant. Stack allocated implicitly
> would be fine, but explicit stack allocation, like declaring variables,
> doesn't happen in purely fu
>That's.. ehem.. quite limiting. :) (you probably meant heap)
I meant what I said, and I said what I meant. Stack allocated implicitly would
be
fine, but explicit stack allocation, like declaring variables, doesn't happen in
purely functional languages.
Personally, I like being able to impose th
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.
> functiona
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,
functional
would mean no explicit stack allocation, except that allocated in called
functions.
Eskapp wrote:
Functional functions could not modify ANY data, including explicitly
allocating
variables. Although, come to think of it, this wouldn't imply pure, as
they should
still be allowed to read global data and call impure functions.
I don't think I understand this. pure functions
Functional functions could not modify ANY data, including explicitly allocating
variables. Although, come to think of it, this wouldn't imply pure, as they
should
still be allowed to read global data and call impure functions.
Sean Eskapp wrote:
I recommend that there be a "functional" keyword, which when applied to
functions, would not allow them to modify existing data, or call impure
functions. This would imply pure.
Thoughts?
What is the difference between this and pure?
--
Simen
I recommend that there be a "functional" keyword, which when applied to
functions, would not allow them to modify existing data, or call impure
functions. This would imply pure.
Thoughts?