Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!ucbvax!BRFAPESP.BITNET!UNBCIC From: UNBCIC@BRFAPESP.BITNET Newsgroups: comp.lang.forth Subject: Compilers (was: Why no ** operator in Modula 2) Message-ID: <9106070455.AA08069@ucbvax.Berkeley.EDU> Date: 6 Jun 91 18:09:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: UNBCIC%BRFAPESP.BITNET@SCFVM.GSFC.NASA.GOV Distribution: world Organization: The Internet Lines: 53 => Date: Sat, 1 Jun 91 07:38:17 GMT => From: editor%ucf1vm.BITNET@LILAC.BERKELEY.EDU => Subject: RE: Why no ** operator in Modula2? => DW> The question came up in class today: Why is there no ** or  (x to the => DW> nth power) operator in standard Modula2? To make you start your own => DW> private module collection of goodies? Because it is machine => DW> dependant??? => => I am a student of computer science at the federal institute of technology in => zurich. as you know, Wirth is doing his stuff here. so we hear some inside => informations here and there. => => now the most possible answer to your question: => => because taking functions liker power into the language makes the compiler => bigger!!! => => note: Wirth: a compiler has to be as small as possible (see also Oberon). => => for my opinion this is a good solution for compiler writers and it is easy to => port such a compiler (in comparision to e.g. a ADA-compiler). decentralism => (hm?) That's why I like Forth. 2Kb compilers are possible. 8 Kb very complete compilers are exists. 11 Kb compilers with assembler, or ANS (currently dpANS) compilers with most of it's (many) extensions are a reality. Trade-offs: Simplified sintax (RPN), no Floating Point (most times; obviously it's avaible, but we aren't used to it), no operator overload. So, making the compiler bigger can be a good reason for not put something. But I doubt a ** operator would do that much, comparing to the current size of the Modula 2 compilers. What I really think it's the reason it's that N. Wirth doesn't think an ** operator is useful. I suppose he thinks that ** would be used as many times as a SIN, for example. So, he taked the ** out of the compiler, and the *LANGUAGE* gets smaller. Less things to learn. BTW, Forth, although small in size is a BIG language, and surelly takes lots of time to learn. (8-DCS) Daniel C. Sobral UNBCIC@BRFAPESP.BITNET P.S.: BTW, does someone know where I can get the Modula 3 -> C compiler source? => => Read ya => Bernd Goetz => => => -- => uucp: uunet!m2xenix!puddle!2!302!815.21!Bernd.Goetz => Internet: Bernd.Goetz@p21.f815.n302.z2.fidonet.org