As t may be applied to a recursion,
ptrA := ptrB
is possibly the only way to fly. I have been reading on the topic of data
structures, and one author who i located in the group being sold at
powells.com. Any comment on this book note written by his publisher?
While many computer science textbooks are confined to teaching programming
code and languages, Algorithms and Data Structures: The Science of
Computing
takes a step back to introduce and explore algorithms - the content of the
code. Focusing on three core topics: design (the architecture of
algorithms), theory (mathematical modeling and analysis), and the
scientific
method (experimental confirmation of theoretical results), the book helps
students see that computer science is about problem solving, not simply
the
memorization and recitation of languages. Unlike many other texts, the
methods of inquiry are explained in an integrated manner so students can
see
explicitly how they interact. Recursion and object oriented programming
are
emphasized as the main control structure and abstraction mechanism,
respectively, in algorithm design. Designed for the CS2 course, the book
includes text exercises and has laboratory exercises at the supplemental
Web
site.
Saturday's 6 $million Dubai World Cup race features Curlin. He ran a good
one on the track last month. Now he's back for all the marble. coverage
in
today's Handicapper's edge at
http://www.tsnhorse.com/cgi-bin/editorial/full_edition.cgi
GL at the races
"Bartc" <bc@[EMAIL PROTECTED]
> wrote in message
news:iQJuj.10236$XI.7988@[EMAIL PROTECTED]
> thomas.mertes@[EMAIL PROTECTED]
wrote:
> > On 18 Feb., 22:02, Bart <b...@[EMAIL PROTECTED]
> wrote:
> >> On Feb 17, 10:13 pm, thomas.mer...@[EMAIL PROTECTED]
wrote:
> >>
> >> [From Seed 7 FAQ]
> >>
> >>> Variables with object types contain references to object values....
> >>> a := b
> >>> For primitive types a different logic is used...
> >>> a := b
> >>> both variables are still distinct and changing one variable has no
> >>> effect on the other.
> >>
> >> This is more of a general question about a:=b for a class object
> >> being different from a:=b for an ordinary object. It seems to be the
> >> case in several oo languages.
> >>
> >> Why?
> > IMHO it is a cornerstone of classic OO programming languages
> > like Smalltalk and its descendants: Object variables and
> > parameters contain just pointers to the actual object value
> > which is at the heap. It is almost not mentioned by OO
> > proponents but in classic OO programming not everything is
> > done with methods. Assignments are always done as pointer
> > assignments, independend of the object class. Also comparisons
> > are done as pointer comparisons. Therefore a 'clone' method
> > to do deep copies and an 'compare' method to do logical
> > comparisons is necessary.
> >
> > The advantage of this OO pointer philosophy is that container
> > cl***** are easier to implement (they store just pointers in
> > the container).
> >
> >> OK, objects are implemented by reference and all that, and maybe this
> >> saves some copying, but that should all be transparent.
> >>
> >> Surely the meaning of something as basic as a:=b should not depend on
> >> something as arbitrary as whether a and b have datatypes T or U. If
> >> someone changes their mind then a lot of recoding might be needed!
> >
> > Most OO programmers have the different assignment logic for
> > object variables in their mind. They would be confused when
> > those assignments would work as deep copies (As Seed7 does
> > for all other types).
> >
> > IIRC Simula had two different assignment operators:
> > := For value copy assignments
> > :- For reference assignments
> >
> > Seed7 is an extensible programming language.
> > It would be possible to define the assignment to do a (deep)
> > copy of the implementation (object) value and to have
> > a different operator to do reference assignment.
> >
> > I don't belive that OO fan's would be happy without
> > reference assignment?
> >
> > What do you think?
>
> I think it's a bit late to change things now.
>
> I suppose I just have to think about objects as pointers instead, with
> whatever they're pointing to being automatically managed:
>
> ptrA := ptrB ( programming equivalent of training wheels :-)
>
> --
> Bart
>
>
>


|