caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] OCaml's variables
@ 2013-05-26 11:35 tools
  0 siblings, 0 replies; 18+ messages in thread
From: tools @ 2013-05-26 11:35 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 63 bytes --]

Gentlemen,

please don't ruin this great mailing list.

Romain.

[-- Attachment #2: Type: text/html, Size: 876 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] OCaml's variables
  2013-05-26 15:00 ` oliver
@ 2013-05-26 18:38   ` Malcolm Matalka
  0 siblings, 0 replies; 18+ messages in thread
From: Malcolm Matalka @ 2013-05-26 18:38 UTC (permalink / raw)
  To: oliver; +Cc: caml-list

[-- Attachment #1: Type: text/plain, Size: 837 bytes --]

I think ocaml had bigger problems to solve than this if it wants a larger
user base.
On May 26, 2013 5:00 PM, "oliver" <oliver@first.in-berlin.de> wrote:

> Looks to me, that the paedagogical concepts
> that were mentioned here, rather create confusion
> than making things clear.
>
> Some students learn this banning of the term "variable"
> (and can rely on "I've learned this in university"),
> spread these news to the programmer community and when
> this wording style comes back to the originators, it will
> be judged as wrong.
>
> These teaching concepts look wrong to me.
>
> Ciao,
>    Oliver
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>

[-- Attachment #2: Type: text/html, Size: 1393 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] OCaml's variables
  2013-05-23 23:53 oliver
  2013-05-24  9:01 ` Arnaud Spiwack
@ 2013-05-26 15:00 ` oliver
  2013-05-26 18:38   ` Malcolm Matalka
  1 sibling, 1 reply; 18+ messages in thread
From: oliver @ 2013-05-26 15:00 UTC (permalink / raw)
  To: caml-list

Looks to me, that the paedagogical concepts
that were mentioned here, rather create confusion
than making things clear.

Some students learn this banning of the term "variable"
(and can rely on "I've learned this in university"),
spread these news to the programmer community and when
this wording style comes back to the originators, it will
be judged as wrong.

These teaching concepts look wrong to me.

Ciao,
   Oliver

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] OCaml's variables
  2013-05-25 22:42                   ` oliver
@ 2013-05-25 23:24                     ` Lukasz Stafiniak
  0 siblings, 0 replies; 18+ messages in thread
From: Lukasz Stafiniak @ 2013-05-25 23:24 UTC (permalink / raw)
  To: oliver
  Cc: David Allsopp, Gabriel Scherer, Wojciech Meyer, Siraaj Khandkar,
	Arnaud Spiwack, OCaML Mailing List

[-- Attachment #1: Type: text/plain, Size: 588 bytes --]

On Sun, May 26, 2013 at 12:42 AM, oliver <oliver@first.in-berlin.de> wrote:

>
> >
> > The OCaml Language Specification is most certainly not a document
> intended
> > for a beginner either to OCaml or functional programming - an obsessive
> > elimination of the word variable would likely make the text less clear
> to those
> > who will actually be reading it.
>
> OK, I see.
>
>
FWIW, I avoid calling them variables when teaching people who are not
math-savvy but already are C/Pascal/Python programmers (unfortunate
condition!) Using "familiar" terms can be an obstacle in that case.

[-- Attachment #2: Type: text/html, Size: 1073 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] OCaml's variables
  2013-05-25 11:49             ` Gabriel Scherer
  2013-05-25 12:04               ` oliver
@ 2013-05-25 22:57               ` oliver
  1 sibling, 0 replies; 18+ messages in thread
From: oliver @ 2013-05-25 22:57 UTC (permalink / raw)
  To: Gabriel Scherer
  Cc: Wojciech Meyer, Siraaj Khandkar, Arnaud Spiwack, OCaML Mailing List

On Sat, May 25, 2013 at 01:49:46PM +0200, Gabriel Scherer wrote:
> The name "variable" has been used for centuries by the mathematicians
> to denote exactly names that refer to values (of course immutable
> values, we're talking about mathematical objects her). There is no
> point in trying to change it because some people conflate this notion
> with mutability.
[...]

Yes, after rethinking this, this seems valid to me.
Even in a function that has only one solution, the
variables are called "variables".

I had in mind: if there is only one fixed solution,
it is not variable, hence it can't be called a variable.

With
  f(x) = 3 * x + 2
"x" is the variable.

f(x) can be calculated out of the function and the valaue of x.
Infinit many results, because infinite many x-values => variable.

But for f(x) = 0, which means
  0 = 3 * x + 2
the "x" also is called a variable, even though there is only one solution.

(...and "one solution" means: fixed result, not variable; but the term "variable"
 will be used nevertheless.

So, you are right.

I just was on the wrong track.
Temporarily black out ;-)


[...]
> The name "variable" is also used in the expression "type variable",
> which denotes for example the 'a in
>   val id : 'a -> 'a
> and which is clearly not associated to any form of mutation.

I wonder why I never had a problem with "type variable" but was
very picky about the term variable at the mentioned refman-page.
But I think it was influenced by the situation of the above
mentioned problem: "if it has only one fixed value it is not varible, it's fixed".
But as also explained above, the "x" nevertheless is called variable.

So my mouring about the reference manual at that point was rubbish.


Ciao,
   Oliver

P.S.: Thanks for the patience/calmness of you and the others.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] OCaml's variables
  2013-05-25 16:53     ` Kristopher Micinski
@ 2013-05-25 22:44       ` oliver
  0 siblings, 0 replies; 18+ messages in thread
From: oliver @ 2013-05-25 22:44 UTC (permalink / raw)
  To: Kristopher Micinski; +Cc: Arnaud Spiwack, OCaML Mailing List

On Sat, May 25, 2013 at 12:53:03PM -0400, Kristopher Micinski wrote:
> On Fri, May 24, 2013 at 7:30 PM, oliver <oliver@first.in-berlin.de> wrote:
> > On Fri, May 24, 2013 at 11:01:39AM +0200, Arnaud Spiwack wrote:
> >> Why were you astounded? This is a perfectly legitimate/correct use of the
> >> word "variable".
> > [...]
> >
> >
> > Do you think so?
> >
> > I have thought about making the sentence better, but did not found
> > a better sentence in short time.
> >
> > But name-value-binding is the term that is used in functional languages.
> > I wonder why the term "variable" pops up there.
> > And even I understood the sentence, I'm not sure if this might create confusion
> > to some readers, because the term "variable" is normally not used for functional languages.
> >
> > People new to FP will be said, there are no "variables", and then they maybe
> > will be irritated, if they find that term in a reference-manual.
> >
> > Do you see what I mean?
> >
> >
> > Ciao,
> >    Oliver
> 
> I agree with everyone else, this is a completely legitimate use of the
> word "variable."
> 
> As a native english speaker who learned OCaml at a younger age, I
> don't think the manual should be changed because a beginner might
> confuse the term "variable" with the name of the thing in C.
> 
> By the way, when you say:
> 
> > People new to FP will be said, there are no "variables", and then they maybe
> > will be irritated, if they find that term in a reference-manual.
> 
> The person saying this will be incorrect for a number of reasons:
>  1. OCaml *does* have mutable values,
>  2. The type of FP you emphasize would be more correctly (to
> disambiguate from OCaml) as purely functional programming
[...]

Yes, I somehow had a Haskell'ish thinking when looking at the ref-man.
But also the examples used there were immutable datastructures.


Maybe I need to explore that issue again in more depth (some of the examples in this thread).

Ciao,
   Oliver

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] OCaml's variables
  2013-05-25 12:30                 ` David Allsopp
@ 2013-05-25 22:42                   ` oliver
  2013-05-25 23:24                     ` Lukasz Stafiniak
  0 siblings, 1 reply; 18+ messages in thread
From: oliver @ 2013-05-25 22:42 UTC (permalink / raw)
  To: David Allsopp
  Cc: Gabriel Scherer, Wojciech Meyer, Siraaj Khandkar, Arnaud Spiwack,
	OCaML Mailing List

On Sat, May 25, 2013 at 12:30:12PM +0000, David Allsopp wrote:
> oliver wrote
> > Hi,
> > 
> > On Sat, May 25, 2013 at 01:49:46PM +0200, Gabriel Scherer wrote:
> > > The name "variable" has been used for centuries by the mathematicians
> > > to denote exactly names that refer to values (of course immutable
> > > values, we're talking about mathematical objects her). There is no
> > > point in trying to change it because some people conflate this notion
> > > with mutability.
> > 
> > Hmhhh.
> > "Some" people? As far as I remember, I heard these arguments quite often.
> 
> Some does not mean few. You appear to be trying to split hairs without a
> sufficient command of English. Once upon a time I would have prefixed that
> "With respect", but various Internet memes mean that most people now know what
> a British person actually means when they say that ;o)

The hairsplitting is built into myself - immutable property.
Regarding my english language skills I have to admit, that they could be better.


> 
> > > (When you write (x + 1), the value denoted by "x" is an unknown that
> > > depends on the context/environment; in particular it may vary when
> > > used in different contexts.)
> > >
> > > The name "variable" is also used in the expression "type variable",
> > > which denotes for example the 'a in
> > >   val id : 'a -> 'a
> > > and which is clearly not associated to any form of mutation.
> > [...]
> > 
> > Hmhhh, and what about imperative languages?
> > What part did they broke?
> > And why did they "misuse" the word "variable" and in which way?
> >
> > Is it because of mutability, which may break all these used "mathematical
> > metaphors"?
> > 
> > Can you elaborate on why "variables" are the wrong term or a 2bad" term in
> > imperative languages and not in functional languages?
> 
> There is no misuse and nothing broken - it is merely that when talking about
> imperative languages the word "variable" is typically where "mutable variable"
> is meant (because immutability is not usually of interest). When first teaching
> functional languages to people who are probably already familiar with
> imperative languages, one often chooses to eliminate the use of the word
> variable. This is because it can be confusing when trying to convey how to
> think functionally versus imperatively (a child's trick: if the student uses
> the word variable they are probably thinking of a reference cell and hence not
> functionally - so you steer the argument by "banning" the word variable from
> the conversation). Once you actually have an understanding of functional
> thinking, the elimination of the word variable becomes unnecessary.

Aha, I see.
Someone also brought in the argument of type variable.
I never had a problem with this so far.
I wonder, why I had a problem now with the stuff on page 136.
Maybe because type variable means, it's not fixed if it's type 'a,
but that a value (e.g. the recursive lists example on that page)
is a non-referenced and therefore immutable value.

The term for the input of a function normally is an "argument" or "parameter",
but seldom called variable.
Maybe thats why I stumbled over this term now.

> 
> The OCaml Language Specification is most certainly not a document intended
> for a beginner either to OCaml or functional programming - an obsessive
> elimination of the word variable would likely make the text less clear to those
> who will actually be reading it.

OK, I see.


Ciao,
   Oliver

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] OCaml's variables
  2013-05-24 23:30   ` oliver
  2013-05-24 23:53     ` Siraaj Khandkar
@ 2013-05-25 16:53     ` Kristopher Micinski
  2013-05-25 22:44       ` oliver
  1 sibling, 1 reply; 18+ messages in thread
From: Kristopher Micinski @ 2013-05-25 16:53 UTC (permalink / raw)
  To: oliver; +Cc: Arnaud Spiwack, OCaML Mailing List

On Fri, May 24, 2013 at 7:30 PM, oliver <oliver@first.in-berlin.de> wrote:
> On Fri, May 24, 2013 at 11:01:39AM +0200, Arnaud Spiwack wrote:
>> Why were you astounded? This is a perfectly legitimate/correct use of the
>> word "variable".
> [...]
>
>
> Do you think so?
>
> I have thought about making the sentence better, but did not found
> a better sentence in short time.
>
> But name-value-binding is the term that is used in functional languages.
> I wonder why the term "variable" pops up there.
> And even I understood the sentence, I'm not sure if this might create confusion
> to some readers, because the term "variable" is normally not used for functional languages.
>
> People new to FP will be said, there are no "variables", and then they maybe
> will be irritated, if they find that term in a reference-manual.
>
> Do you see what I mean?
>
>
> Ciao,
>    Oliver

I agree with everyone else, this is a completely legitimate use of the
word "variable."

As a native english speaker who learned OCaml at a younger age, I
don't think the manual should be changed because a beginner might
confuse the term "variable" with the name of the thing in C.

By the way, when you say:

> People new to FP will be said, there are no "variables", and then they maybe
> will be irritated, if they find that term in a reference-manual.

The person saying this will be incorrect for a number of reasons:
 1. OCaml *does* have mutable values,
 2. The type of FP you emphasize would be more correctly (to
disambiguate from OCaml) as purely functional programming
 3. The term variable doesn't make sense here anyway, in FP there are
tons of variables just as there are in all of mathematics.  What
purely functional programming lacks is a notion of mutable state in
its operational semantics: you can still add them via monads (of
course).

Kris

^ permalink raw reply	[flat|nested] 18+ messages in thread

* RE: [Caml-list] OCaml's variables
  2013-05-25 12:04               ` oliver
@ 2013-05-25 12:30                 ` David Allsopp
  2013-05-25 22:42                   ` oliver
  0 siblings, 1 reply; 18+ messages in thread
From: David Allsopp @ 2013-05-25 12:30 UTC (permalink / raw)
  To: oliver, Gabriel Scherer
  Cc: Wojciech Meyer, Siraaj Khandkar, Arnaud Spiwack, OCaML Mailing List

oliver wrote
> Hi,
> 
> On Sat, May 25, 2013 at 01:49:46PM +0200, Gabriel Scherer wrote:
> > The name "variable" has been used for centuries by the mathematicians
> > to denote exactly names that refer to values (of course immutable
> > values, we're talking about mathematical objects her). There is no
> > point in trying to change it because some people conflate this notion
> > with mutability.
> 
> Hmhhh.
> "Some" people? As far as I remember, I heard these arguments quite often.

Some does not mean few. You appear to be trying to split hairs without a sufficient command of English. Once upon a time I would have prefixed that "With respect", but various Internet memes mean that most people now know what a British person actually means when they say that ;o)

> > (When you write (x + 1), the value denoted by "x" is an unknown that
> > depends on the context/environment; in particular it may vary when
> > used in different contexts.)
> >
> > The name "variable" is also used in the expression "type variable",
> > which denotes for example the 'a in
> >   val id : 'a -> 'a
> > and which is clearly not associated to any form of mutation.
> [...]
> 
> Hmhhh, and what about imperative languages?
> What part did they broke?
> And why did they "misuse" the word "variable" and in which way?
>
> Is it because of mutability, which may break all these used "mathematical
> metaphors"?
> 
> Can you elaborate on why "variables" are the wrong term or a 2bad" term in
> imperative languages and not in functional languages?

There is no misuse and nothing broken - it is merely that when talking about imperative languages the word "variable" is typically where "mutable variable" is meant (because immutability is not usually of interest). When first teaching functional languages to people who are probably already familiar with imperative languages, one often chooses to eliminate the use of the word variable. This is because it can be confusing when trying to convey how to think functionally versus imperatively (a child's trick: if the student uses the word variable they are probably thinking of a reference cell and hence not functionally - so you steer the argument by "banning" the word variable from the conversation). Once you actually have an understanding of functional thinking, the elimination of the word variable becomes unnecessary.

The OCaml Language Specification is most certainly not a document intended for a beginner either to OCaml or functional programming - an obsessive elimination of the word variable would likely make the text less clear to those who will actually be reading it.


David 

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] OCaml's variables
  2013-05-25 11:49             ` Gabriel Scherer
@ 2013-05-25 12:04               ` oliver
  2013-05-25 12:30                 ` David Allsopp
  2013-05-25 22:57               ` oliver
  1 sibling, 1 reply; 18+ messages in thread
From: oliver @ 2013-05-25 12:04 UTC (permalink / raw)
  To: Gabriel Scherer
  Cc: Wojciech Meyer, Siraaj Khandkar, Arnaud Spiwack, OCaML Mailing List

Hi,

On Sat, May 25, 2013 at 01:49:46PM +0200, Gabriel Scherer wrote:
> The name "variable" has been used for centuries by the mathematicians
> to denote exactly names that refer to values (of course immutable
> values, we're talking about mathematical objects her). There is no
> point in trying to change it because some people conflate this notion
> with mutability.

Hmhhh.
"Some" people? As far as I remember, I heard these arguments quite often.


> 
> (When you write (x + 1), the value denoted by "x" is an unknown that
> depends on the context/environment; in particular it may vary when
> used in different contexts.)
> 
> The name "variable" is also used in the expression "type variable",
> which denotes for example the 'a in
>   val id : 'a -> 'a
> and which is clearly not associated to any form of mutation.
[...]

Hmhhh, and what about imperative languages?
What part did they broke?
And why did they "misuse" the word "variable" and in which way?

Is it because of mutability, which may break all these
used "mathematical metaphors"?

Can you elaborate on why "variables" are the wrong term or a 2bad" term
in imperative languages and not in functional languages?

The picture is not completely clear, where the imperative approach did it wrong.

Ciao,
   Oliver

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] OCaml's variables
  2013-05-25 11:04           ` oliver
@ 2013-05-25 11:49             ` Gabriel Scherer
  2013-05-25 12:04               ` oliver
  2013-05-25 22:57               ` oliver
  0 siblings, 2 replies; 18+ messages in thread
From: Gabriel Scherer @ 2013-05-25 11:49 UTC (permalink / raw)
  To: oliver
  Cc: Wojciech Meyer, Siraaj Khandkar, Arnaud Spiwack, OCaML Mailing List

The name "variable" has been used for centuries by the mathematicians
to denote exactly names that refer to values (of course immutable
values, we're talking about mathematical objects her). There is no
point in trying to change it because some people conflate this notion
with mutability.

(When you write (x + 1), the value denoted by "x" is an unknown that
depends on the context/environment; in particular it may vary when
used in different contexts.)

The name "variable" is also used in the expression "type variable",
which denotes for example the 'a in
  val id : 'a -> 'a
and which is clearly not associated to any form of mutation.

On Sat, May 25, 2013 at 1:04 PM, oliver <oliver@first.in-berlin.de> wrote:
> Hello,
>
> but the that argument also holds true for other lists.
> They are finite, but every element of the posisble holds a new value.
> But the name for a list binds to that list, not to individual values.
> That they are recursive in the case of page 136 does not change this.
>
> Finite lists hold finite number of posisbly different values.
> Infinite lists hold infinite number of possible different values.
>
> I see no reason, why the finite list must be seen as key-value binding,
> but the infinite list can be seen as variable.
> Once the name is bound to both these kinds of lists,
> they don't change.
>
> Compared to this, a reference would have more entitlement to be seen as
> "variable".
>
> Ciao,
>    Oliver
>
>
> On Sat, May 25, 2013 at 06:14:11AM +0100, Wojciech Meyer wrote:
>> Dear Oliver,
>>
>> Well, the variable does not mean that the value can vary over the
>> time, but rather that it means that it and can be defined over the
>> set of (possibly) infinite different values.
>>
>> So the term variable is fully valid and justified.
>>
>> oliver <oliver@first.in-berlin.de> writes:
>>
>> > On Fri, May 24, 2013 at 07:53:33PM -0400, Siraaj Khandkar wrote:
>> >>
>> >> On May 24, 2013, at 7:30 PM, oliver <oliver@first.in-berlin.de> wrote:
>> >>
>> >> > On Fri, May 24, 2013 at 11:01:39AM +0200, Arnaud Spiwack wrote:
>> >> >> Why were you astounded? This is a perfectly legitimate/correct
>> >> >> use of the
>> >> >> word "variable".
>> >> > [...]
>> >> >
>> >> >
>> >> > Do you think so?
>> >> >
>> >> > I have thought about making the sentence better, but did not found
>> >> > a better sentence in short time.
>> >> >
>> >> > But name-value-binding is the term that is used in functional languages.
>> >> > I wonder why the term "variable" pops up there.
>> >> > And even I understood the sentence, I'm not sure if this might
>> >> > create confusion
>> >> > to some readers, because the term "variable" is normally not used
>> >> > for functional languages.
>> >> >
>> >> > People new to FP will be said, there are no "variables", and then
>> >> > they maybe
>> >> > will be irritated, if they find that term in a reference-manual.
>> >> >
>> >> > Do you see what I mean?
>> >>
>> >> If you think of functions as equations, non-constant values are variables.
>> > [...]
>> >
>> > Where do the non-constant values come from?
>> > I don't see there non-constant values.
>> >
>> > Even a referemce, where the value is mutable, is represented
>> > as a name-binding to the reference (container).
>> > But in the chapter on page 136 it's about recursive values.
>> >
>> > That does not mean the values are mutable.
>> >
>> > So I wonder, why the term variables might be ok there.
>> >
>> > Why is on the one hand emphasized, that there are name-value bindings,
>> > on the other hands variables are the right term?
>> >
>> > Or am I too picky?
>> > Or has my mind be infected at the time
>> > when I looked at Haskell and it's pureness?
>> >
>> >
>> > Ciao,
>> >    Oliver
>>
>> --
>> Wojciech
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] OCaml's variables
  2013-05-25  5:14         ` Wojciech Meyer
@ 2013-05-25 11:04           ` oliver
  2013-05-25 11:49             ` Gabriel Scherer
  0 siblings, 1 reply; 18+ messages in thread
From: oliver @ 2013-05-25 11:04 UTC (permalink / raw)
  To: Wojciech Meyer; +Cc: Siraaj Khandkar, Arnaud Spiwack, OCaML Mailing List

Hello,

but the that argument also holds true for other lists.
They are finite, but every element of the posisble holds a new value.
But the name for a list binds to that list, not to individual values.
That they are recursive in the case of page 136 does not change this.

Finite lists hold finite number of posisbly different values.
Infinite lists hold infinite number of possible different values.

I see no reason, why the finite list must be seen as key-value binding,
but the infinite list can be seen as variable.
Once the name is bound to both these kinds of lists,
they don't change.

Compared to this, a reference would have more entitlement to be seen as
"variable".

Ciao,
   Oliver


On Sat, May 25, 2013 at 06:14:11AM +0100, Wojciech Meyer wrote:
> Dear Oliver,
> 
> Well, the variable does not mean that the value can vary over the
> time, but rather that it means that it and can be defined over the
> set of (possibly) infinite different values.
> 
> So the term variable is fully valid and justified.
> 
> oliver <oliver@first.in-berlin.de> writes:
> 
> > On Fri, May 24, 2013 at 07:53:33PM -0400, Siraaj Khandkar wrote:
> >>
> >> On May 24, 2013, at 7:30 PM, oliver <oliver@first.in-berlin.de> wrote:
> >>
> >> > On Fri, May 24, 2013 at 11:01:39AM +0200, Arnaud Spiwack wrote:
> >> >> Why were you astounded? This is a perfectly legitimate/correct
> >> >> use of the
> >> >> word "variable".
> >> > [...]
> >> >
> >> >
> >> > Do you think so?
> >> >
> >> > I have thought about making the sentence better, but did not found
> >> > a better sentence in short time.
> >> >
> >> > But name-value-binding is the term that is used in functional languages.
> >> > I wonder why the term "variable" pops up there.
> >> > And even I understood the sentence, I'm not sure if this might
> >> > create confusion
> >> > to some readers, because the term "variable" is normally not used
> >> > for functional languages.
> >> >
> >> > People new to FP will be said, there are no "variables", and then
> >> > they maybe
> >> > will be irritated, if they find that term in a reference-manual.
> >> >
> >> > Do you see what I mean?
> >>
> >> If you think of functions as equations, non-constant values are variables.
> > [...]
> >
> > Where do the non-constant values come from?
> > I don't see there non-constant values.
> >
> > Even a referemce, where the value is mutable, is represented
> > as a name-binding to the reference (container).
> > But in the chapter on page 136 it's about recursive values.
> >
> > That does not mean the values are mutable.
> >
> > So I wonder, why the term variables might be ok there.
> >
> > Why is on the one hand emphasized, that there are name-value bindings,
> > on the other hands variables are the right term?
> >
> > Or am I too picky?
> > Or has my mind be infected at the time
> > when I looked at Haskell and it's pureness?
> >
> >
> > Ciao,
> >    Oliver
> 
> --
> Wojciech

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] OCaml's variables
  2013-05-25  0:40       ` oliver
@ 2013-05-25  5:14         ` Wojciech Meyer
  2013-05-25 11:04           ` oliver
  0 siblings, 1 reply; 18+ messages in thread
From: Wojciech Meyer @ 2013-05-25  5:14 UTC (permalink / raw)
  To: oliver; +Cc: Siraaj Khandkar, Arnaud Spiwack, OCaML Mailing List

Dear Oliver,

Well, the variable does not mean that the value can vary over the
time, but rather that it means that it and can be defined over the
set of (possibly) infinite different values.

So the term variable is fully valid and justified.

oliver <oliver@first.in-berlin.de> writes:

> On Fri, May 24, 2013 at 07:53:33PM -0400, Siraaj Khandkar wrote:
>>
>> On May 24, 2013, at 7:30 PM, oliver <oliver@first.in-berlin.de> wrote:
>>
>> > On Fri, May 24, 2013 at 11:01:39AM +0200, Arnaud Spiwack wrote:
>> >> Why were you astounded? This is a perfectly legitimate/correct
>> >> use of the
>> >> word "variable".
>> > [...]
>> >
>> >
>> > Do you think so?
>> >
>> > I have thought about making the sentence better, but did not found
>> > a better sentence in short time.
>> >
>> > But name-value-binding is the term that is used in functional languages.
>> > I wonder why the term "variable" pops up there.
>> > And even I understood the sentence, I'm not sure if this might
>> > create confusion
>> > to some readers, because the term "variable" is normally not used
>> > for functional languages.
>> >
>> > People new to FP will be said, there are no "variables", and then
>> > they maybe
>> > will be irritated, if they find that term in a reference-manual.
>> >
>> > Do you see what I mean?
>>
>> If you think of functions as equations, non-constant values are variables.
> [...]
>
> Where do the non-constant values come from?
> I don't see there non-constant values.
>
> Even a referemce, where the value is mutable, is represented
> as a name-binding to the reference (container).
> But in the chapter on page 136 it's about recursive values.
>
> That does not mean the values are mutable.
>
> So I wonder, why the term variables might be ok there.
>
> Why is on the one hand emphasized, that there are name-value bindings,
> on the other hands variables are the right term?
>
> Or am I too picky?
> Or has my mind be infected at the time
> when I looked at Haskell and it's pureness?
>
>
> Ciao,
>    Oliver

--
Wojciech

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] OCaml's variables
  2013-05-24 23:53     ` Siraaj Khandkar
@ 2013-05-25  0:40       ` oliver
  2013-05-25  5:14         ` Wojciech Meyer
  0 siblings, 1 reply; 18+ messages in thread
From: oliver @ 2013-05-25  0:40 UTC (permalink / raw)
  To: Siraaj Khandkar; +Cc: Arnaud Spiwack, OCaML Mailing List

On Fri, May 24, 2013 at 07:53:33PM -0400, Siraaj Khandkar wrote:
> 
> On May 24, 2013, at 7:30 PM, oliver <oliver@first.in-berlin.de> wrote:
> 
> > On Fri, May 24, 2013 at 11:01:39AM +0200, Arnaud Spiwack wrote:
> >> Why were you astounded? This is a perfectly legitimate/correct use of the
> >> word "variable".
> > [...]
> > 
> > 
> > Do you think so?
> > 
> > I have thought about making the sentence better, but did not found
> > a better sentence in short time.
> > 
> > But name-value-binding is the term that is used in functional languages.
> > I wonder why the term "variable" pops up there.
> > And even I understood the sentence, I'm not sure if this might create confusion
> > to some readers, because the term "variable" is normally not used for functional languages.
> > 
> > People new to FP will be said, there are no "variables", and then they maybe
> > will be irritated, if they find that term in a reference-manual.
> > 
> > Do you see what I mean?
> 
> If you think of functions as equations, non-constant values are variables.
[...]

Where do the non-constant values come from?
I don't see there non-constant values.

Even a referemce, where the value is mutable, is represented
as a name-binding to the reference (container).
But in the chapter on page 136 it's about recursive values.

That does not mean the values are mutable.

So I wonder, why the term variables might be ok there.

Why is on the one hand emphasized, that there are name-value bindings,
on the other hands variables are the right term?

Or am I too picky?
Or has my mind be infected at the time
when I looked at Haskell and it's pureness?


Ciao,
   Oliver

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] OCaml's variables
  2013-05-24 23:30   ` oliver
@ 2013-05-24 23:53     ` Siraaj Khandkar
  2013-05-25  0:40       ` oliver
  2013-05-25 16:53     ` Kristopher Micinski
  1 sibling, 1 reply; 18+ messages in thread
From: Siraaj Khandkar @ 2013-05-24 23:53 UTC (permalink / raw)
  To: oliver; +Cc: Arnaud Spiwack, OCaML Mailing List


On May 24, 2013, at 7:30 PM, oliver <oliver@first.in-berlin.de> wrote:

> On Fri, May 24, 2013 at 11:01:39AM +0200, Arnaud Spiwack wrote:
>> Why were you astounded? This is a perfectly legitimate/correct use of the
>> word "variable".
> [...]
> 
> 
> Do you think so?
> 
> I have thought about making the sentence better, but did not found
> a better sentence in short time.
> 
> But name-value-binding is the term that is used in functional languages.
> I wonder why the term "variable" pops up there.
> And even I understood the sentence, I'm not sure if this might create confusion
> to some readers, because the term "variable" is normally not used for functional languages.
> 
> People new to FP will be said, there are no "variables", and then they maybe
> will be irritated, if they find that term in a reference-manual.
> 
> Do you see what I mean?

If you think of functions as equations, non-constant values are variables.

Imperative languages don't get to claim the term just because they misused it
for a long time ;)

Think of the word "hacker" - it was hijacked and misused for a while, but I
feel like it has mostly been recovered these days. Perhaps we can recover the
accepted meaning of variables if we consistently contrast them with reference
cells.


-- 
Siraaj Khandkar
.o.  o.o  ..o  o..  .o.
..o  .oo  o.o  .oo  ..o
ooo  .o.  .oo  oo.  ooo



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] OCaml's variables
  2013-05-24  9:01 ` Arnaud Spiwack
@ 2013-05-24 23:30   ` oliver
  2013-05-24 23:53     ` Siraaj Khandkar
  2013-05-25 16:53     ` Kristopher Micinski
  0 siblings, 2 replies; 18+ messages in thread
From: oliver @ 2013-05-24 23:30 UTC (permalink / raw)
  To: Arnaud Spiwack; +Cc: OCaML Mailing List

On Fri, May 24, 2013 at 11:01:39AM +0200, Arnaud Spiwack wrote:
> Why were you astounded? This is a perfectly legitimate/correct use of the
> word "variable".
[...]


Do you think so?

I have thought about making the sentence better, but did not found
a better sentence in short time.

But name-value-binding is the term that is used in functional languages.
I wonder why the term "variable" pops up there.
And even I understood the sentence, I'm not sure if this might create confusion
to some readers, because the term "variable" is normally not used for functional languages.

People new to FP will be said, there are no "variables", and then they maybe
will be irritated, if they find that term in a reference-manual.

Do you see what I mean?


Ciao,
   Oliver

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] OCaml's variables
  2013-05-23 23:53 oliver
@ 2013-05-24  9:01 ` Arnaud Spiwack
  2013-05-24 23:30   ` oliver
  2013-05-26 15:00 ` oliver
  1 sibling, 1 reply; 18+ messages in thread
From: Arnaud Spiwack @ 2013-05-24  9:01 UTC (permalink / raw)
  To: oliver; +Cc: OCaML Mailing List

[-- Attachment #1: Type: text/plain, Size: 792 bytes --]

Why were you astounded? This is a perfectly legitimate/correct use of the
word "variable".


On 24 May 2013 01:53, oliver <oliver@first.in-berlin.de> wrote:

> Hi,
>
> I was astouned to find the term "variables" in the Reference Manual for
> OCaml 4.00.
>
> Found that on page 136 in the sentence with "(...) statically constructive
> (...)".
>
> Did not checked, if this is on other pages also.
> To tired to check it, and to tired/lazy for a bugreport now...
> ...but thought it might be something that might better be corrected.
>
>
> Ciao,
>    Oliver
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
>

[-- Attachment #2: Type: text/html, Size: 1477 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Caml-list] OCaml's variables
@ 2013-05-23 23:53 oliver
  2013-05-24  9:01 ` Arnaud Spiwack
  2013-05-26 15:00 ` oliver
  0 siblings, 2 replies; 18+ messages in thread
From: oliver @ 2013-05-23 23:53 UTC (permalink / raw)
  To: caml-list

Hi,

I was astouned to find the term "variables" in the Reference Manual for
OCaml 4.00.

Found that on page 136 in the sentence with "(...) statically constructive (...)".

Did not checked, if this is on other pages also.
To tired to check it, and to tired/lazy for a bugreport now...
...but thought it might be something that might better be corrected.


Ciao,
   Oliver

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2013-05-26 18:38 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-26 11:35 [Caml-list] OCaml's variables tools
  -- strict thread matches above, loose matches on Subject: below --
2013-05-23 23:53 oliver
2013-05-24  9:01 ` Arnaud Spiwack
2013-05-24 23:30   ` oliver
2013-05-24 23:53     ` Siraaj Khandkar
2013-05-25  0:40       ` oliver
2013-05-25  5:14         ` Wojciech Meyer
2013-05-25 11:04           ` oliver
2013-05-25 11:49             ` Gabriel Scherer
2013-05-25 12:04               ` oliver
2013-05-25 12:30                 ` David Allsopp
2013-05-25 22:42                   ` oliver
2013-05-25 23:24                     ` Lukasz Stafiniak
2013-05-25 22:57               ` oliver
2013-05-25 16:53     ` Kristopher Micinski
2013-05-25 22:44       ` oliver
2013-05-26 15:00 ` oliver
2013-05-26 18:38   ` Malcolm Matalka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).