On Sat, Feb 16, 2013 at 1:23 AM, Boyko Bantchev <[email protected]> wrote:
> On 16 February 2013 00:12, Raul Miller <[email protected]> wrote:
>> With this definition, all programming is "functional programming", and
>> there's no distinction between "imperative programming" and
>> "functional programming".
>
> This 'conclusion' of yours is logically fallacious.

I think that there's a problem with logical conclusions which can be
accurately summed up using the acronym GIGO.

Put simply, logical conclusions depend on the axioms we start with.
And, in this case, the only axioms we both have to work with are the
ones I have supplied.  You have not made clear the definitions you are
working from.  You may have additional details that you are privy to
which make your statements consistent, but I do not have access to
those details.

>> At this point, I think I will refer you to wikipedia
>
> At this point, rather than quoting general, summary statements from
> a source of disputable credibility, you should have better taken into
> account that the vast majority of the so called functional languages
> (J included) are not purely functional, and that, for a number of
> reasons, their functions are not at all 'mathematical functions'.
> The latter holds even of those several languages conventionally
> described as 'purely functional'.
>
> Now, is there a reason for you to jump with totally irrelevant remarks
> at more or less each of my (rare) posts in these forums?

I would be happy to doubt the credibility of wikipedia in the context
of that sentence, if you would supply a more credible reference which
contradicts it.

But, to answer your question: I strongly believe that your statements
have something in them which is worth understanding.  But
communication is the only mechanism I have, for filling in the blanks,
where I do not understand something you are saying.  And, all too
often, what you say flat out contradicts what I think I know.  So to
find the worthwhile parts, I feel compelled to talk with you.

That said, I remembered that this context ("functional programming")
has multiple phrases including both: "function level" and "functional"
programming.  The term "function level" was introduced to capture some
of the character of the motivation that lead to the popular use of the
phrase "functional programming".  Haskell is a classic example of what
I (and wikipedia) would call a "functional programming" language,
while J is a classic example of what I (and wikipedia) would call a
"function-level programming language".

That said, while it is true that J is not "purely" functional, in the
sense of this term "functional programming language" it's also true
that a significant subset of J is "pure" and can be used to represent
"purely functional" programs.

To relate this back to the original context (of "closures" as
discussed in the context of J): I think that I would restate the
original statement as "closures are not purely functional, so cannot
be represented in a purely functional subset of J".  Your apparent
claim that this statement was false made me uncomfortable - clearly
there was something I was not understanding, and so I set about to
find out what it was.

Does that answer your question?

Currently, my struggles with understanding you focus on some of the
most recent statements you have made. Can you describe some examples
of your statement "their functions are not at all 'mathematical
functions'. The latter holds even of those several languages
conventionally described as 'purely functional'."?

Is it possible to resolve these examples using the symbolism of
Haskell's IO Monad?

Since that question is getting into obscure terminology, and since I'm
uncomfortable with how we have been handling terminology:

My understanding the "IO Monad" is that it's something like J's
"under" but where &. is a general mechanism, the IO Monad is a
pre-built reference to the outside world, and it symbolizes the
transformation of a function like Y = F(X) into a function like
(universe, Y) = G(universe, X). In other words, by claiming that our
function operates on the state of the universe we can claim that it is
"pure".

Note that it's difficult to treat the symbols in lexical closure using
the IO Monad, since we do not normally think of a name by itself as
being a function.

A related issue, of course, is that functions which operate on the
entire universe (which is what the IO Monad is conceived of as doing)
become difficult to reason about. So it's entirely reasonable to want
to minimize or even ignore the IO Monad. But if we are to ignore it,
we should probably also characterize the "pure" in "purely functional"
as something which is not always desirable.

And, of course, based on past experience, you will quite likely to
express disagreement with most everything I have written here. If you
do so, I will interpret that as "my attempts at understanding your
point have not gotten close to your actual point". But, I am hoping
that, some day, I will understand you, and can only hope that at some
point you will explain yourself in a way that someone like me, with my
obviously inferior grasp of the essentials, can comprehend.

Thanks,

-- 
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to