Jump to page: 1 2 3
Thread overview
Isn't "transitive" the wrong word?
Apr 04, 2008
Janice Caron
Apr 04, 2008
Jason House
Apr 04, 2008
Jesse Phillips
Apr 04, 2008
Janice Caron
Apr 04, 2008
Jesse Phillips
Apr 04, 2008
guslay
Apr 04, 2008
Walter Bright
Apr 04, 2008
BCS
Apr 04, 2008
Walter Bright
Apr 04, 2008
Brad Roberts
Apr 06, 2008
Scott S. McCoy
Apr 04, 2008
JMNorris
Apr 04, 2008
Manfred Nowak
Apr 04, 2008
Janice Caron
Apr 04, 2008
Manfred Nowak
Apr 05, 2008
Janice Caron
Apr 05, 2008
Manfred Nowak
Apr 05, 2008
Janice Caron
Apr 05, 2008
Manfred Nowak
Apr 05, 2008
Janice Caron
Apr 06, 2008
Jeff Nowakowski
Apr 06, 2008
Janice Caron
Apr 06, 2008
Jeff Nowakowski
Apr 10, 2008
Bruno Medeiros
Apr 11, 2008
Jeff Nowakowski
Apr 11, 2008
Leandro Lucarella
Apr 10, 2008
Bruno Medeiros
April 04, 2008
Sorry to go all grammar/mathematics nit-picky, but isn't "transitive" completely the wrong word?

The word "transitive" applies to binary relations, like less-than. A relation R is transitive if

    (a R b) and (b R c) implies (a R c)

For example, less-than is transitive, because

    (a < b) and (b < c) implies (a < c)

But the word "transitive" has no meaning when applied to a unary type
constructor like const().

No, methinks the word you're looking for here is RECURSIVE. Const in D is recursive, not transitive.

Should we change all the documention, or is this some new definition of "transitive" which is in common use in some field of which I am unaware?
April 04, 2008
Janice Caron Wrote:

> Sorry to go all grammar/mathematics nit-picky, but isn't "transitive" completely the wrong word?
> 
> The word "transitive" applies to binary relations, like less-than. A relation R is transitive if
> 
>     (a R b) and (b R c) implies (a R c)
> 
> For example, less-than is transitive, because
> 
>     (a < b) and (b < c) implies (a < c)
> 
> But the word "transitive" has no meaning when applied to a unary type
> constructor like const().
> 
> No, methinks the word you're looking for here is RECURSIVE. Const in D is recursive, not transitive.
> 
> Should we change all the documention, or is this some new definition of "transitive" which is in common use in some field of which I am unaware?

If we had an operator for "contains" or "is accessible from", and an operator for const, I'd say "is accessible from" is transitive and const is distributive.
April 04, 2008
On Fri, 04 Apr 2008 10:23:01 +0100, Janice Caron wrote:

> Sorry to go all grammar/mathematics nit-picky, but isn't "transitive" completely the wrong word?
> 
> The word "transitive" applies to binary relations, like less-than. A relation R is transitive if
> 
>     (a R b) and (b R c) implies (a R c)
> 
> For example, less-than is transitive, because
> 
>     (a < b) and (b < c) implies (a < c)
> 
> But the word "transitive" has no meaning when applied to a unary type
> constructor like const().
> 
> No, methinks the word you're looking for here is RECURSIVE. Const in D is recursive, not transitive.
> 
> Should we change all the documention, or is this some new definition of "transitive" which is in common use in some field of which I am unaware?

Except when you look at the definition of transitive in the dictionary, "having or containing an object required to complete the meaning." Thus if we have a transitive const then all things inside it must also be const. I see no reason to make changes.
April 04, 2008
On 04/04/2008, Jesse Phillips <jessekphillips@gmail.com> wrote:
> Except when you look at the definition of transitive in the dictionary,
>  "having or containing an object required to complete the meaning." Thus
>  if we have a transitive const then all things inside it must also be
>  const.

What dictionary are you reading? It doesn't say that in Chambers or Merriam-Websters.

M-W says
  1  : characterized by having or containing a direct object <a
transitive verb> <a transitive construction>
   2  : being or relating to a relation with the property that if the
relation holds between a first element and a second and between the
second element and a third, it holds between the first and third
elements <equality is a transitive relation>
   3  : of, relating to, or characterized by transition


> I see no reason to make changes.

Given that transitive isn't a keyword, there are no changes to make.
(I was just being nitpicky.)

That said, I do suspect that using odd words in discussion or articles or whatever doesn't help lessen confusion.
April 04, 2008
Janice Caron Wrote:

> Sorry to go all grammar/mathematics nit-picky, but isn't "transitive" completely the wrong word?
> 
> But the word "transitive" has no meaning when applied to a unary type
> constructor like const().
> 
> No, methinks the word you're looking for here is RECURSIVE. Const in D is recursive, not transitive.
> 
> Should we change all the documention, or is this some new definition of "transitive" which is in common use in some field of which I am unaware?

You are correct. Recursive (but recursive is already full of meaning) or chaining would be better words for something that "brings the const along"...

But I think the concept mainly need clarification, not a different name. I could not find a comprehensive definition. I think it would be helpful, as it is a key concept.

Here is my attempt. I discern three parts: syntax, data, function.


- If I am not mistaken, I've seen the term used to qualify how the syntax works.

   const(int*)** p;

By the transitivity rule, this syntax defines a const pointer to a const pointer to an int pointer.



- One part of it is purely data centric.

   A const pointer can point to a const data or a mutable data, but offers only a read-only view of it.

For those who still want to fight about it, you could not mutate a mutable class members trough a const pointer (this is not where mutable breaks transitivity), as who could not mutate a global state.



- But what is const transitivity when calling a const function?

I would say that there is currently no such thing as const function transitivity. The only thing that would fit the concept is pure function. Because a const function provides sufficient indirection to mutate some states, the concept of transitivity seems to lose its meaning when applied to a function.

"Logical const breaks transitivity." I cannot say that I agree. Logical const might break /something/. It might impede pure and functional programming, depending on how strong your assumptions are about FP (unshameful self-reference: http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=69141
sorry for the grammar), but it does not break transitivity.

This part needs clarification.


April 04, 2008
Janice Caron wrote:
> Sorry to go all grammar/mathematics nit-picky, but isn't "transitive"
> completely the wrong word?

No, it is used in this sense in academic papers on the subject.
April 04, 2008
Walter Bright wrote:
> Janice Caron wrote:
> 
>> Sorry to go all grammar/mathematics nit-picky, but isn't "transitive"
>> completely the wrong word?
> 
> 
> No, it is used in this sense in academic papers on the subject.

That might not answer the question.

One question that should be asked (but it might be to late to ask) is; is transitive the word that /should/ be used? Note that this is distinct from the question of transitive being the world that /is/ used.
April 04, 2008
BCS wrote:
> Walter Bright wrote:
>> Janice Caron wrote:
>>
>>> Sorry to go all grammar/mathematics nit-picky, but isn't "transitive"
>>> completely the wrong word?
>>
>>
>> No, it is used in this sense in academic papers on the subject.
> 
> That might not answer the question.
> 
> One question that should be asked (but it might be to late to ask) is; is transitive the word that /should/ be used? Note that this is distinct from the question of transitive being the world that /is/ used.

We should only invent new jargon if we're forced to. I don't see any compelling reason not to use transitive in the same form that academics use it to write papers about.
April 04, 2008
On Fri, 4 Apr 2008, Walter Bright wrote:

> BCS wrote:
> > Walter Bright wrote:
> > > Janice Caron wrote:
> > > 
> > > > Sorry to go all grammar/mathematics nit-picky, but isn't "transitive" completely the wrong word?
> > > 
> > > 
> > > No, it is used in this sense in academic papers on the subject.
> > 
> > That might not answer the question.
> > 
> > One question that should be asked (but it might be to late to ask) is; is transitive the word that /should/ be used? Note that this is distinct from the question of transitive being the world that /is/ used.
> 
> We should only invent new jargon if we're forced to. I don't see any compelling reason not to use transitive in the same form that academics use it to write papers about.

The term 'transitive' comes from the term 'transitive closure' used in graphs.  Data structures form a graph and so the term transitive applies quite well.

Later,
Brad
April 04, 2008
Janice Caron wrote:

> The word "transitive" applies to binary relations

From the article on const:
"Const being transitive in D means that every reference reachable
through the const is also const."

This is clearly expressing a binary relation.

-manfred
« First   ‹ Prev
1 2 3