From: logic@mtak.bsj.com (Masami Takikawa)
Newsgroups: fj.lang.c,fj.comp.oops
Subject: Re: object-oriented programming with C++ (Re: [book] on C++ without supposing C)
Date: 22 Nov 92 20:40:20 GMT
	<SEIKI.92Nov19213027@dublin.hi.flab.fujitsu.co.jp>
	<HOKIMOTO.92Nov21015449@is17e0s09.jaist-east.ac.jp>
Reply-To: logic@mtak.bsj.com (Masami Takikawa)
Distribution: fj
Organization: The Takikawa, Corvallis, Oregon, U.S.A.
Posting-Front-End: Terakoya-u kaku 2.04 March 31, 1990

$B$3$s$K$A$O!"Bl@n$G$9!#(J

In article <HOKIMOTO.92Nov21015449@is17e0s09.jaist-east.ac.jp>
	hokimoto@jaist-east.ac.jp (Akihiro Hokimoto) writes:
>  function call$B$O!"I,$:(J message $B$rH/9T$7$?(J object $B$KBP$7$F=hM}$N(J
>$B7k2L$rJV$7$^$9!#(Jmessage $B$rH/9T$9$k(J object $B$O!"$I$N(J object $B$KBP$7(J
>$B$F(J message $B$rAw$k$+$r;XDj$G$-$^$9!#$7$+$7!"(Jmessage $B$r<u$1$H$C$?(J 
>object $B$,7k2L$r(J message $B$GAw$k>l9g$K$O(J message $B$rAw$k(J object $B$r;X(J
>$BDj$9$k$3$H$,=PMh$^$;$s!#(J

$B$=$&$$$&0UL#$G$7$?$+!#(J

Smalltalk $B$N(J "message passing" $B$b(J "message passing" $B$H8F$V$K$OL5M}(J
$B$,$"$k$H$$$&$o$1$G$9$M!#$=$l$b#1$D$N9M$(J}$G$9$M!#$^$"!"3N$+$K!"$$(J
$B$D$b7k2L$rMW5a$9$k$N$O!"(Jprimitive $B$J(J message passing $B$N7ABV$G$O$J$$(J
$B$H;W$$$^$9!#(J

$B$G!"JBNs!J$^$?$OJB9T!K$KF0$/(J object $B$,5-=R$G$-$J$$$N$O!"D>Ns8@8l$J(J
$B$N$@$+$i$"$?$jA0$H$7$F!"D>Ns8@8l$GI,$:!"7k2L$rJV$9;v$rMW5a$9$k;v$K(J
$B2?$+ITET9g$,$"$k$G$7$g$&$+!)(J


>    object A $B$+$i(J object B $B$KBP$7$F(J message A $B$rAw$k(J
>    object B $B$O=hM}$N7k2L$r(J message B $B$K$h$C$F(J object B $B$KAw$k(J
>
>    $B=hM}MW5a(J       object A -- message A --> object B
>    $B7k2L(J           object B -- message B --> object A

semantics $B$H$7$F$O!"(Jmessage A $B$K(J object A $B$,0z?t(J(return object)$B$H(J
$B$7$FM?$($i$l$F$$$F!"(J"return" $B$O(J "return object" (object A) $B$K(J message B
$B$rAw$k$H9M$($k$s$G$7$g$&$M!#E}0l@-$O$J$$$1$I!";~$K$O!"JXMx$5$d8zN((J
$B$N$?$a$KE}0l@-$r5>@7$K$9$k$3$H$bI,MW$G$9!#$3$NJU$N%H%l!<%I%*%U$r$I(J
$B$&2r7h$9$k$+!"$,8@8l@_7W<T$NOS$N8+$;=j$G$7$g$&!#(JC++ $B$O8zN($H$$$&LL(J
$B$K=E$-$r$*$$$?8@8l$G$9$M!#(J


>    object A $B$+$i(J object B $B$KBP$7$F(J message A $B$rAw$k(J
>    object B $B$O=hM}$N7k2L$r(J message B $B$K$h$C$F(J object C $B$KAw$k(J
>
>    $B=hM}MW5a(J       object A -- message A --> object B
>    $B7k2L(J           object B -- message B --> object C

$B$3$l$O$b$A$m$s!"(JC++ $B$G$b$G$-$^$9$M!J$b$A$m$s(J object B $B$,=hM}$7$F$$(J
$B$k4V$K(J object A $B$,JB9TF0:n$7$J$/$F$$$$$J$i!K!#(J

object A $B$N(J method {
	object_B->message_A();
}
void object_B $B$N(J message_A $B$KBP1~$7$?(J method {
    $B7W;;(J;
	object_C->message_B($B7k2L(J);
}

$B%3%s%Q%$%i$,8-$1$l$P!J:#$O$J$$$H;W$&$1$I!K!"(Jmethod $B$N:G8e$N(J function
call $B$O(J jump $B$K$G$-$^$9$+$i!"(Jfunction call $B$H$$$&$h$j$bK\Ev$K(J message
$B$H0l=o$K@)8f$r0\$9$_$?$$$J%$%a!<%8$K$J$j$^$9$M!#(J


>  message passing $B$G$"$k$H8@$C$?>l9g(J parallel $B$G$"$kI,MW$O$J$$$H(J
>$B;W$$$^$9$,!"(Jconcurent $B$G$"$kI,MW$O$"$k$H;W$$$^$9!#3F(J object $B$,FH(J
>$BN)$7$FF0:n$G$-$J$$$H$^$:$$$G$7$g$&$+$i!#(J

$B$H$$$&$3$H$O!"(Jmessage passing $B$H8@$C$?;~$K$O!"HsF14|$8$c$J$/$F$O(J
$B$$$1$J$$$H$$$&;v$G$9$M!#$^$"!"(JC++ $B$b(J smalltalk $B$bD>Ns8@8l$@$+$i!"(J
$B$3$l$OMW5a$7$F$b$7$g$&$,$J$$!#(J

message passing $B$,$G$-$J$$$+$i!"(JC++ $B$O(J OOP $B8@8l$8$c$J$$!"$H$$$&46(J
$B$8$N=q$-J}$@$C$?$H;W$$$^$7$?$,!"3F(J object $B$,JB9TF0:n$G$-$J$$$+$i!"(J
C++ $B$O(J OOP $B8@8l$8$c$J$$!"$H8@$C$?J}$,@53N$G$9$M!#(JOOP $B8@8l$NDj5A$K(J
$B$=$3$^$GMW5a$9$k$N$O5?Ld$G$9$,!#(J
--
$B$?$-$+$o!w$*$l$4$s(J