| Chris Page 2004-06-24, 12:56 am |
| Based upon my recent news post about copying Dylan objects, Iıve written
an extended Dylan blog entry concerning copying and assignment, how it
differs from C++, and some examples of how to implement copying:
--------------------------8<--------------------------
Dylan Object Copying (or lack thereof)
Answering the question ³How do you copy objects in Dylan?² often begins
with ³You donıt.²
Recently there was a discussion in the #dylan IRC channel on
freenode.net about copying objects in Dylan. Someone asked how to copy
objects as in C++, where assignment with =ı is a copying operation and
when the destination is a class (or struct) instance the compiler can
automatically generate a simple bitwise copy of its data members.
In short: Dylan programs copy objects much less often than typical C++
code, assignment does not copy objects, objects are only copied
explicitly, and simple bitwise copying is often inappropriate...
--------------------------8<--------------------------
The full text of the entry is available here:
<http://homepage.mac.com/chrispage/iblog/index.html>
--
Chris Page - Software Wrangler - Dylan Pundit
Open Source Dylan: <http://www.gwydiondylan.org/>
Dylan Blogging: <http://homepage.mac.com/chrispage/iblog/>
|