🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #2286

Why no ** operator in Modula2?

#2286
From: Kevin Williams
Date: Wed, 29 May 1991 07:20
28 lines
1767 bytes
Hello Debora!

In a msg of <27 May 91>, Debora Weber-Wulff writes to All:


 DW> The question came up in class today: Why is there no ** or ^
 DW> (x to the nth power) operator in standard Modula2?
 DW> To make you start your own private module collection of goodies?
 DW> Because it is machine dependant???
 DW>
 DW> We checked the 3 books we use in class and found no mention of
 DW> why this is missing.

  Hmmm.  All of my references list it as a library function.  I suppose this makes sense, since you don't have generics in Modula-2 (like you have in Ada). As for WHY Wirth left it out, well, I'd suppose that he either didn't see it as important (unlikely) or he decided that it'd be too much trouble to make it standard (more likely).  Whatever the case, it's fairly easy to implement, and it's used rarely enough, that it should be a fairly reasonable problem to do so for all the assorted types.  Also, note 






that there's more than one way to skin a programmer -- that is, there are so many different ways to implement something like this that you'll usually get arguments about which way is better.

     kwill


--  
uucp: uunet!m2xenix!puddle!128!64!Kevin.Williams
Internet: Kevin.Williams@f64.n128.z1.fidonet.org
Technical Details
Message-ID: <772.2846E491@puddle.fidonet.org>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zephyr.ens.tek.com!tektronix!percy!m2xenix!puddle!f64.n128.z1.fidonet.org!Kevin.Williams

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zephyr.ens.tek.com!tektronix!percy!m2xenix!puddle!f64.n128.z1.fidonet.org!Kevin.Williams
From: Kevin.Williams@f64.n128.z1.fidonet.org (Kevin Williams)
Newsgroups: comp.lang.modula2
Subject: Why no ** operator in Modula2?
Message-ID: <772.2846E491@puddle.fidonet.org>
Date: 29 May 91 07:20:00 GMT
Sender: ufgate@puddle.fidonet.org (newsout1.26)
Organization: FidoNet node 1:128/64 - Myopius, Colorado Springs CO
Lines: 22