<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px"><div id="yui_3_16_0_ym19_1_1488456086715_91525"><span style="font-family: 'Courier New'; font-size: 16px; white-space: pre-wrap;" id="yui_3_16_0_ym19_1_1488456086715_92988">Srinivas,</span></div><div class="qtdSeparateBR" id="yui_3_16_0_ym19_1_1488456086715_91526" dir="ltr"><pre style="font-size: 16px;" id="yui_3_16_0_ym19_1_1488456086715_91544"><br></pre><pre style="font-size: 16px;" id="yui_3_16_0_ym19_1_1488456086715_91544">1. By "conventional programming style" I mean using the Oberon language, but without using *OOP concepts* such as installed handler procedures in extensible records or extensible message records passed as VAR parameters to handler procedures. The observation made was that in the Oberon system such techniques are used *only* in the viewer system. With respect to your comment about the Oberon-2 programming language, note that the Oberon operating system is written entirely in the (original) Oberon language, with no parts written in Object Oberon or Oberon-2. So the argument was mostly about using "the OOP concepts" rather than being specific about the language used. The point made by the defendants of the "instance-centered view" (Original Oberon camp) was that the feature of "type extensions" is really all that you need, given that in the Oberon system, *OOP concepts* are used only in the viewer system. And for *that*, type extensions, as provided in the original Oberon language, have been proven to be amply sufficient. It is therefore does not seem to be necessary to also add *additional* features such as the CLASS construct (as introduced in Object Oberon) or type-bound procedures (as introduced in Oberon-2). Such additional language constructs would only have been justified if there had been *other* areas (i.e. outside the viewer system) where type extensions *alone* are not enough. The one area that one could possibly think of were graphics editors. Why? Because there, you may have hundreds or even thousands of graphics elements (such as lines, circles, ellipses, entire drawings, etc) as opposed to (typically) only half a dozen simultaneously open viewers, as in the Oberon viewer system. Thus, the need for efficient upcalls *might* in fact have been a good argument in favor of the "class-centered" view (which does offer more efficient upcalls via class methods) - at least on machines available in the early 1990s. However, the "Draw" editor has shown, that you *can* in fact eliminate also the often cited performance disadvantage of message handlers (with their cascaded IF statements that needed to be executed at run time) by effectively programming "by hand" what Object Oberon and Oberon-2 achieve with a language construct. Namely a single method "do" that is installed in each instance, which simply points to a method table programmed "by hand". This of course comes at the expense of a rather verbose way of programming relative to Object Oberon or Oberon-2 - just study the module Graphics.Mod to see why.</pre><pre style="font-size: 16px;" id="yui_3_16_0_ym19_1_1488456086715_91544"><br></pre><pre style="font-size: 16px;" id="yui_3_16_0_ym19_1_1488456086715_91544">2. Regarding the use of *OOP concepts* in the Oberon compiler itself, the point was that one does not only NOT need the additional features provided by Object Oberon or Oberon-2, such as the CLASS concept (Object Oberon) or type-bound procedures (Oberon-2), but that even the Original Oberon concept of *type extensions* is NOT needed. Nothing. No type extension, no classes, no type-bound procedures. And indeed, the four modules ORS, ORB, ORG and ORP don't contain any type extensions or installed handler procedures. In other words, the Oberon compiler is (practically) written in Modula-2, and for good reasons. In fact, I learned compiler writing in Modula-2 on MC68000 years before Oberon was created. Then, when Oberon came along, the transition was trivial (as far as the language constructs used in the compiler itself were concerned).</pre><pre style="font-size: 16px;" id="yui_3_16_0_ym19_1_1488456086715_91544"><br></pre><pre style="font-size: 16px;" id="yui_3_16_0_ym19_1_1488456086715_91544">Andreas</pre><pre style="font-size: 16px;" id="yui_3_16_0_ym19_1_1488456086715_91544"><br></pre><br></div><div class="yahoo_quoted" id="yui_3_16_0_ym19_1_1488456086715_91530" style="display: block;"> <div style="font-family: Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 13px;" id="yui_3_16_0_ym19_1_1488456086715_91529"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_ym19_1_1488456086715_91528"> <div dir="ltr" id="yui_3_16_0_ym19_1_1488456086715_91527"> <font size="2" face="Arial" id="yui_3_16_0_ym19_1_1488456086715_91531"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Srinivas Nayak <sinu.nayak2001@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> ETH Oberon and related systems <oberon@lists.inf.ethz.ch> <br><b><span style="font-weight: bold;">Cc:</span></b> Andreas Pirklbauer <andreas_pirklbauer@yahoo.com><br> <b><span style="font-weight: bold;">Sent:</span></b> Friday, March 3, 2017 6:36 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Oberon] Class Methods Vs. Procedure variables in Records<br> </font> </div> <div class="y_msg_container" id="yui_3_16_0_ym19_1_1488456086715_91532"><br><div id="yiv9896228062"><div id="yui_3_16_0_ym19_1_1488456086715_91535"><div dir="ltr" id="yui_3_16_0_ym19_1_1488456086715_91534"><pre style="white-space:pre-wrap;" id="yui_3_16_0_ym19_1_1488456086715_91533">Dear Andreas,</pre><pre style="white-space:pre-wrap;"><br clear="none"></pre><pre style="white-space:pre-wrap;">From your post...</pre><pre style="white-space:pre-wrap;" id="yui_3_16_0_ym19_1_1488456086715_91574">"Look, an entire operating system (the Oberon system) could be advantageously written in the conventional programming style. So this fact alone impressively proves that OOP is not all that essential, even when writing an entire OS. The only exception is the viewer system - which however is done now."</pre><pre style="white-space:pre-wrap;"><br clear="none"></pre><pre style="white-space:pre-wrap;" id="yui_3_16_0_ym19_1_1488456086715_92580">If I understood correctly,</pre><pre style="white-space:pre-wrap;" id="yui_3_16_0_ym19_1_1488456086715_92893">do you mean,</pre><pre style="white-space:pre-wrap;" id="yui_3_16_0_ym19_1_1488456086715_92560">"Look, an entire operating system (the Oberon system) could be advantageously written in the conventional programming style *(with only one extra thing, "type extension"; i.e extending a record)* . So this fact alone impressively proves that OOP is not all that essential, even when writing an entire OS. The only exception is the viewer system - which however is done now. *(which uses "type extension"; i.e extending a record)* "</pre><pre style="white-space:pre-wrap;" id="yui_3_16_0_ym19_1_1488456086715_92562"><br clear="none"></pre><pre style="white-space:pre-wrap;" id="yui_3_16_0_ym19_1_1488456086715_92564">And in case of compilers, they said, "type extension" is also not a need, since one needs bootstrapping anyway... and that is why, Oberon even doesn't use type extension feature when it is bootstrapped using a subset of Oberon, i.e. Oberon-0.</pre><pre style="white-space:pre-wrap;"><br clear="none"></pre><pre style="white-space:pre-wrap;">Is my understanding correct?</pre><pre style="white-space:pre-wrap;"><br clear="none"></pre></div><div class="yiv9896228062gmail_extra"><br clear="none"><div class="yiv9896228062gmail_quote">On Wed, Mar 1, 2017 at 12:36 PM, Andreas Pirklbauer <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:andreas_pirklbauer@yahoo.com" target="_blank" href="mailto:andreas_pirklbauer@yahoo.com">andreas_pirklbauer@yahoo.com</a>></span> wrote:<br clear="none"><blockquote class="yiv9896228062gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="yiv9896228062yqt5070087825" id="yiv9896228062yqt68752"><div style="word-wrap:break-word;"><pre style="background-color:rgb(255,255,255);"><span style="white-space:pre-wrap;">Richard Hable Tue Feb 28 20:23:00 CET 2017</span></pre><pre style="background-color:rgb(255,255,255);"><span><span style="white-space:pre-wrap;">> > Wirth remains: these languages are still too complex. Why again are
> > there separate concepts for structs (=records), classes (=pointers to
> > records), modules, and protocols, and extensions, and and .. in Swift,
> > when exactly two would do (records for data structuring and modules for
> > information hiding)?
>
> On the other hand, if you use Oberon or Oberon-2, you need at least
> three definitions in order to define a simple class: the module
> containing the class, a record type containing its member variables, and
> a pointer type referring to the record.<br clear="none">><br clear="none">> Richard,<br clear="none"><br clear="none">- - - - - - - - - - - - - - - - - - - - - - - - - - - -</span></span></pre><pre style="background-color:rgb(255,255,255);"><span><span style="white-space:pre-wrap;"><br clear="none">. . . which this is why I wrote in my original post of January 3rd, 2017:<br clear="none"><br clear="none">> Personally, I believe Oberon7 is enough for many purposes, and that<br clear="none">> certainly includes system design. And that is why I decided to stick<br clear="none">> to the original Oberon language in Experimental Oberon. But that is<br clear="none">> entirely my personal bias. From an educational point of view, I would<br clear="none">> consider using Oberon-2 instead, as it very nicely and cleanly demonstrated<br clear="none">> the various OOP concepts. But in any case, more important than the choice<br clear="none">> of the language is, I believe, to teach the debate.<br clear="none"><br clear="none">You are right, one does indeed need module, record and pointer declarations to implement the OOP style exemplified in the Draw editor that is part of the Original Oberon distribution.<br clear="none"><br clear="none"></span></span></pre><pre style="background-color:rgb(255,255,255);"><span><span style="white-space:pre-wrap;">On the other hand: Apart from the viewer system and a handful of document editors like Draw, one *could* make the argument that there is not much need for using OOP in many other places. One may of course agree or disagree with that statement -personally, I have no predisposition one way or the other. But as I stated in my original note from Jan 3, 2017, this was (more or less) the essence of the main argument brought forward by the "instance-centered" group at ETH around Prof. Wirth (the "Original Oberon” camp so to speak) in the early 1990 - I was just reporting what has been said back then during the debate. They basically argued: "Look, an entire operating system (the Oberon system) could be advantageously written in the conventional programming style. So this fact alone impressively proves that OOP is not all that essential, even when writing an entire OS. The only exception is the viewer system - which however is done now." This argument, when it is thrown at you, is hard to argue agains, given that the authors of the Oberon system have gone to great lengths of actually implementing it :-) So t</span></span><span style="white-space:pre-wrap;">heir argument felt a little bit like this: "Guys, we already did it (once) in the Oberon viewer system, so no need to do it again there. Of course, 'you app developers' out there can use OOP it in a things like document editors where you can use Draw as a template. Just copy it and you’ll see, you’ll fine. It’s all you need. But: this is it! Document editors and, perhaps, a few other scenarios. Where else would you 'really' need OOP?". Indeed, there is only a handful of document editors, not thousands, that have been developed over the years.</span></pre><pre style="background-color:rgb(255,255,255);"><span style="white-space:pre-wrap;"><br clear="none"></span></pre><pre style="background-color:rgb(255,255,255);"><span style="white-space:pre-wrap;">But of course, despite this rather purist few, people at ETH back then have written other software using the OOP style using either Object Oberon or Oberon-2 — after all, one has to master it, right?. I have used both Object Oberon and Oberon-2 extensively. At one point, even the Oberon-2 compiler itself was reexpressed in Oberon-2, using type extensions </span><span style="white-space:pre-wrap;">and type-bound procedures </span><span style="white-space:pre-wrap;">to distinguish between the different kind of entries in the compiler's list of the declared symbols (the so-called symbol table) for example. Of course [..note: when you were at ETH in those days, one develops a kind of Pavlov effect, in the sense that one already knows what the answer is going to be before it is even given..], the "counter argument" against THAT decision was to state the following: (i) look, a compiler is typically bootstrapped, i.e. it *must* first be written in another language that does not support type extension, such as Modula-2. So in any case, you have to start with a compiler that (almost by definition) cannot possibly use type extension (because it's the feature you are actually implementing for the first time), (ii) not using type extensions makes it easier to translate the compiler into *other* languages, a step that may be necessary in yet another bootstrapping exercise on yet another platform where Oberon-2 is not yet available, and (iii) why again would you use type extensions in a program such as a compiler in the first place when *all* extensions are already known at the time the compiler is written, i.e. the compiler will - by definition - not ever be extended in any substantial way in the future (unless the language itself is changed of course in a substantial way, which however has not happened in the last 25+ years last time I checked). In this particular example, my personal view is that using Oberon-2 does indeed increase the readability of the compiler somewhat - mainly because one no longer has to remember what all those multi-purpose fields for class-specific attributes actually mean. But that is not a particularly strong argument, considering that the entire compiler is now down to only about 2500 lines. You either master THAT or you don't. If you don't, no amount of rewriting it in a a slightly more convenient notation will make you understand it better..</span></pre><pre style="background-color:rgb(255,255,255);"><span><span style="white-space:pre-wrap;"><br clear="none"></span></span></pre><pre style="background-color:rgb(255,255,255);"><span><span style="white-space:pre-wrap;">But there are other examples of programs that have been built using Oberon-2. But again, that Pavlov reflex..</span></span></pre><pre style="background-color:rgb(255,255,255);"><span><span style="white-space:pre-wrap;"><br clear="none">Of course, from an educational point of view, it is perhaps indeed asked too much from eg a 16-year old to reconstruct a Draw-like system from scratch. They just won't. And this is why I added my *personal* remark (re-inserted above) which states that the additional elements (class keyword, type-bound procedures, etc) *may* make some sense from a practical point of view - even though the purist may claim they are not really needed.</span></span></pre><pre style="background-color:rgb(255,255,255);"><span><span style="white-space:pre-wrap;"><br clear="none"></span></span></pre><pre style="background-color:rgb(255,255,255);"><span style="white-space:pre-wrap;">But we don't live in a purely academic world of course!. Imagine an Android or iOS development environment (IDE) with only Oberon or Oberon-2, but no class concept as provided by Java (on Android) or Objective-C/Swift (on iOS). It would not be as easy for many programmers. Many would be lost indeed. I don't see how the platform providers could have achieved the degree of uniformity that they have without certain "templates" pre-canned (and pre-built into) the IDE. All Android and iOS apps look alike (from a principal point of view only of course). The same can certainly *not* be said of Oberon-(1,2).</span></pre><span class="yiv9896228062HOEnZb"><font color="#888888"></font></span><pre style="background-color:rgb(255,255,255);"><br clear="none"></pre><pre style="background-color:rgb(255,255,255);"><span><span style="white-space:pre-wrap;">Andreas<br clear="none"><br clear="none"><br clear="none"></span></span></pre></div></div><br clear="none">--<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:Oberon@lists.inf.ethz.ch" target="_blank" href="mailto:Oberon@lists.inf.ethz.ch">Oberon@lists.inf.ethz.ch</a> mailing list for ETH Oberon and related systems<br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="https://lists.inf.ethz.ch/mailman/listinfo/oberon">https://lists.inf.ethz.ch/ mailman/listinfo/oberon</a><br clear="none">
<br clear="none"></blockquote></div><br clear="none"><br clear="all"><div><br clear="none"></div>-- <br clear="none"><div class="yiv9896228062gmail_signature"><div>With thanks and best regards,</div><div> </div><div>Yours sincerely,</div><div>Srinivas Nayak</div><div> </div><div>Home: <a rel="nofollow" shape="rect" target="_blank" href="http://www.mathmeth.com/sn/">http://www.mathmeth.com/sn/</a><br clear="none"><span>Blog: <a rel="nofollow" shape="rect" target="_blank" href="http://srinivas-nayak.blogspot.in/">http://srinivas-nayak.blogspot.in/</a></span><br clear="none"></div><div> </div></div>
</div></div></div><br><br></div> </div> </div> </div></div></body></html>