Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!midway!iitmax!gkt From: gkt@iitmax.iit.edu (George Thiruvathukal) Newsgroups: comp.lang.modula2 Subject: Re: BIX - BYTE - JPI - Chaos Message-ID: <1991Apr23.170148.23254@iitmax.iit.edu> Date: 23 Apr 91 17:01:48 GMT References: <10113@ifi.informatik.uni-stuttgart.de> Organization: Illinois Institute of Technology / Academic Computing Center Lines: 86 In article <10113@ifi.informatik.uni-stuttgart.de>, schoebel@bs3.informatik.uni-stuttgart.de (Thomas Schoebel) writes: > In article <1991Apr19.173651.9572@iitmax.iit.edu> gkt@iitmax.iit.edu (George Thiruvathukal) writes: > >I will suggest, however, that language extensions probably ought to be done in > >a fashion consistent with the original philosophy of the language. Modula-2 > >was designed to support the notion of very strong typing. An extension to the > >language which allows variable argument lists effectively relaxes the type > >checking system. > > > >> Add those features and you get real power in the libraries. > > > >Here is a nifty idea. Extend every language to have all of the features of C. > >Add a type cast operator. Allow any operator to be overloaded, including the > >dot and comma. Why not throw in those variable arguments. Maybe even change > >the type system so it is unreadable by humans (like it is in C). Well, if you > >add all of those features, you will be able to exploit the "real power" of > >practically any C library. After all, the semantics of the languages will > >practically be the same! > > > >-- > >George Thiruvathukal > > I don't agree. The problem is not to *allow* language extensions, > rather than *how* this is done. If your extensions lead to a *chance* to > get more (undiscovered) errors, you are right. But who says all this > "dirty" features lead to unreadability? Maybe you should reread the sentence above more carefully. The "type system" alluded to is the mechanism for one to declare a type expression. "It" refers to the "type system" and does not imply anything about the readability of the overall code in a given application. I was facetiously proposing that we go so far as to change the syntax of type declarations, so Modula-2 looks like C. > An example: I want to implement exact arithmetic, numbers which may be > as large as there is memory. Normal Operators like + - * / are not > usable in standard MODULA-2, but if I have the chance to make a "dirty" > implementation of this, my code will be more readable! Same will be > true for other OOP features. So I *want* the ability to express the > same semantics as in C, but in a safe way! Your argument is fine, except for one fine point. What we are talking about is Modula-2. Operator overloading, definition, and OOP features are more than language extensions. The semantics of the Modula-2 language must be changed in a significant way to accommodate such extensions. To properly accommodate the notion of operator overloading (and operator definition in the Prolog sense) would require significant language extensions (which would invariably be derived from C++ -- the most unfortunate of programming languages). > So I think the best is to give experts the ability to implement langage > extensions, if they know what they are doing. Of course, this is unsafe > and may lead to bugs... No, I believe there exists a serious flaw in your argument. I think there is a big, big difference between those who implement and those who design programming languages. The people at JPI and Borland are language implementors. Their primary objective is to get the product out the door. A secondary (or perhaps insignificant) issue is to design a good language. There is no question that these people know what they are doing when it comes to implementation. You are right about the fact that it is unsafe for the (language implementation) experts to do so, because it may lead to bugs (as well as changes which are inconsistent with the original design philosophy). Many people have complained that one of the penetrating problems at JPI from version to version is the proliferation of bugs. > I doubt you really know the original philosophy of MODULA-2. ^^^^^^^^^^^^^^^^^^^^^ | | Here is how I feel right now :-( . Does that make you :-) ? I do not recall going out of my way to insult anyone, but obviously you have no problem doing so. Let me ask you a question, given your status as an "eminent" philosopher of "language design" in our time: are you Niklaus Wirth? If you are, then you know the original design philosophy of Modula-2. Your discussion unveils your lack of comprehension (or appreciation) of the philosophy of Modula-2, because you echo the chimes of others who believe we ought to add every unsafe feature to the language just so we can get the dirty work done with the minimum amount of effort. Regards, -- George Thiruvathukal Laboratory for Parallel Computing and Languages Illinois Institute of Technology Chicago