Re: How come Ada isn't more popular?



On Sun, 04 Feb 2007 23:33:40 +0100, Markus E Leypold wrote:

"Dmitry A. Kazakov" <mailbox@xxxxxxxxxxxxxxxxx> writes:

They don't share subtrees they share memory (implementation), which is
casual to the program semantics.

They share representation in the underlying system / VM / whatever you
call it.

Whatever. They are not shared in the sense of aliasing, when you have more
than one name for semantically same thing. 1+1 and 3-1 "share" 2. And this
is irrelevant to where 2 might be allocated or how it were encoded.

When a subtree C of a tree A changes, should it ("it" is an
identity (:-)) in the tree B be changed as well?

Change? There is no "change" in a functional world, only the
production of new values (i.e. new elements from a specific set, in
your case the set of all trees).

(New values? What is the difference between new and old values? Do values
carry RFID chips with timestamps? (:-))

Don't play dumb. There is certainly an order between value occuring in
a (functional) program.

Values "occur"? [ You cannot fix the sentence above, it is semantically
broken. ]

Consider a mapping between nodes of two trees which has to be
preserved. Now a function of the first tree is evaluated, what
happens with the function of the second tree?

g
A ------> B
| |
f| | id = nothing happens
| |
V g V
f(A) ------> B (broken invariant)

The function of the second tree? What are you talking about? Let me
repeat: In pure functional languages nothing "changes".

Consider A = tree, B = its maximal path. When f(A) "occur," [a node is
removed] what happens with B?

Answer: nothing happens, the program is broken. The programmer has to
manually evaluate Max_Path(f(A)). "Maximal path of" is non-functional.

It makes a
difference if you pass an access to a variable instead of passing the
variable as an in/out parameter and there is a difference if you
pass it as an in parameter.

It does because access T and T are different types! T is not passed, access
T is passed (by reference or by value).

You could save much time if you just said that you wanted referential
objects (pointers). Period.

Now my question again, what prevents you from collecting objects accessed
via controlled referential objects?

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
.



Relevant Pages

  • Re: Exposing contained types.. Especially LISTS
    ... Code may want to interact with A's methods (add ... the original and permanent" "holder" to the reference to TheList, ... Now one can navigate up and down the tree easily using ... This is a case where the clients now all talk to to navigate the ...
    (comp.object)
  • Re: MFC Newbie design question
    ... > without increasing the reference count. ... At the end of the day the tree node ... > locate the correct XML node object and update it accordingly. ... >> The loaded document will be displayed in a TreeView. ...
    (microsoft.public.vc.mfc)
  • Re: [PATCH] fix race in mark_mounts_for_expiry()
    ... > don't move from one tree to another (bind mounts don't link them, ... > the parents should be inaccessible anyway. ... except chroot() changes ... It would need quite a revamp of the current reference counting. ...
    (Linux-Kernel)
  • Re: infinity
    ... > I'd like to see this alleged bijection between *N and Pbefore I ... Consider the infinite binary tree. ... In the second tree, each path, each bit string, ...
    (sci.math)
  • Re: Identical Item in Cut/Copy/Paste
    ... Select the top level tree item and select paste. ... It also seems your tree nodes are called DataModel which is a little odd ... making your code a bit confusing upon first glance. ... to give it a new reference to be stored in 'data' but like I said above, ...
    (comp.lang.java.programmer)