🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #1995

Re: BIX - BYTE - JPI - Chaos

#1995
From: Thomas Schoebel
Date: Tue, 23 Apr 1991 11:36
53 lines
3536 bytes
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?
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!

You may not believe it, but I am a language purist, too! Nothing looks
more atrocious than FORTRAN or BASIC style written in MODULA-2. The
best language, the best tools will not give you any gain if you don't
know how to take advantage from it. 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,
but you can shield the details from the user. If the interfaces are well
designed, the user's system will be more safe. This is the main idea of
modularity, which is *totally* missing in C! In Modula, linking may be
done type-safe. Extending the language will not generally circumvent
all checks!

I doubt you really know the original philosophy of MODULA-2. To me
the main goals seem not only to be clarity, modularity, safety and so on,
but also the possibilities of a SYSTEM IMPLEMENTATION LANGUAGE which
has to allow unsafe operations by its nature. But when I am a pig doing
dirty things, I have to write this *expicitly* down. For example, If I
use a typecast, this may be read as "Now I do dirty things, because I need
it and I know what I'm doing". This is the essential difference to C,
where I am always a pig even if I don't want to be one!

Thomas
Technical Details
Message-ID: <10113@ifi.informatik.uni-stuttgart.de>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!snorkelwacker.mit.edu!ira.uka.de!ifistg!bs3!schoebel
References: <editor%ucf1vm.BITNET@LILAC.BERKELEY.EDU> <8015.280c0c0e@lhn.dsir.govt.nz> <1991Apr19.173651.9572@iitmax.iit.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!snorkelwacker.mit.edu!ira.uka.de!ifistg!bs3!schoebel
From: schoebel@bs3.informatik.uni-stuttgart.de (Thomas Schoebel)
Newsgroups: comp.lang.modula2
Subject: Re: BIX - BYTE - JPI - Chaos
Message-ID: <10113@ifi.informatik.uni-stuttgart.de>
Date: 23 Apr 91 11:36:58 GMT
References: <editor%ucf1vm.BITNET@LILAC.BERKELEY.EDU> <8015.280c0c0e@lhn.dsir.govt.nz> <1991Apr19.173651.9572@iitmax.iit.edu>
Sender: news@ifistg.uucp
Organization: Informatik, Uni Stuttgart, W. Germany
Lines: 53