<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Andreas<div><br></div><div>Isn‘t output one of the examples that could benefit of „interfaces“?<div>- output for debugging</div><div>- output to file</div><div>- output to screen</div><div>- output to serial line</div><div>- output in a pipe..<br><br>All those module could offer Int(), String(), Char(), Real() etc.</div><div>In other words, whenever you can write</div><div> IMPORT A := B;</div><div><br></div><div>A and B should implement the same interface.</div><div><br><div dir="ltr">br<br><div>Jörg</div></div><div dir="ltr"><br><blockquote type="cite">Am 25.10.2020 um 14:46 schrieb Andreas Pirklbauer <andreas_pirklbauer@yahoo.com>:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><meta http-equiv="Content-Type" content="text/html charset=utf-8"><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class=""> > Do you support something like the following?</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69); min-height: 14px;" class=""> ></div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class=""> > TextDesc = RECORD (TextProtocol.TextDesc, WriteProtocol.WriterDesc) END ;</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class=""> ></div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class=""><br class=""></div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class="">Yes! But multiple inheritance has it own set of issues, as you’re surely aware.</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class="">It adds a host of new complexities which are well documented in the literature.</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class="">Witness the Go or the Java implementations that you mentioned.</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class=""><br class=""></div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class="">But leaving multiple inheritance aside, I wonder whether can make a point</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class="">for adopting protocols. So far, I haven’t found any. It seems like one of those</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class="">features that shouldn’t be there in the first place. Or I am wrong?</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class=""><br class=""></div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class=""><br class=""></div><span>--</span><br><span>Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems</span><br><span>https://lists.inf.ethz.ch/mailman/listinfo/oberon</span><br></div></blockquote></div></div></body></html>