Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!killer!ames!mailrus!iuvax!rutgers!cs.utexas.edu!ut-emx!juniper!olorin From: olorin@juniper.uucp (David Weinstein) Newsgroups: comp.lang.forth Subject: Re: Infix operators Keywords: Parallel, controllers Message-ID: <4158@juniper.uucp> Date: 30 Aug 88 23:43:44 GMT References: <8808121826.AA23206@jade.berkeley.edu> <1575@crete.cs.glasgow.ac.uk> <6882@well.UUCP> <1581@crete.cs.glasgow.ac.uk> <4057@juniper.uucp> <472@umn-d-ub.D.UMN.EDU> Reply-To: olorin@juniper.UUCP (David Weinstein) Organization: Austin UNIX Users' Group, Austin, TX Lines: 73 In article <472@umn-d-ub.D.UMN.EDU> gandreas@ub.d.umn.edu.UUCP (Glenn Andreas) writes: >In article <4057@juniper.uucp> olorin@juniper.UUCP (David Weinstein) writes: >> >>NO, it would not. It is possible to write awful code for any language (ever >>*looked* at the Unix source?). But even the best written C still looks, >>well, sloppy. >This is certainly your opinion. I personally don't really like C, but I have >seen some "neat" code in C. But how about languages like Pascal or Modula-2? >Is it any wonder why many beginning cs courses use Pascal? It's readable, >that's why! Funny...I thought that they taught Pascal because it's a programming straight jacket... :-) The "sloppiness" I was referring to is the: function (arguments) format. It is (at least in my opinion), harder to read than well written Forth (now badly written Forth on the other hand...) C, the language which I do most of my programming in (I have to pay my rent :-), is in fact "almost readable". I dislike Pascal because I feel confined (I *don't* like paternalistic compilers). > [Material about why you can't write really high level code in "conventional languages" deleted] >For an even better place for this type of factoring, consider Smalltalk. It >has an even better "noun verb" format - instead of "noun noun noun verb", it >is "noun adjective noun verb noun" (anArray at: 5 put: 10) - and this I >wouldn't consider to be RPN english! An excellent point. I am very interested in learning Smalltalk, but Forth is very efficient, powerful, and (in my opinion) easy to understand. I would be delighted to see Forth taught as an introductory class in CS, because it teaches so many wonderful technques (and it teaches about the underlying hardware in a very easy to undertsand manner). Forth does not require tremendous resources (although they are nice :-) ), and it is fairly easy to implement, and expand... As I have said, I don't know about Smalltalk, so I can't compare the two... > >>As to the great infix/postfix/prefix/fix-the-fight controversy: >> >>RPN is not hard to learn, and quickly becomes intuitive. As to the assertion >>that programmers don't learn it, how many are using HP Calculators? How many >>non-programmers use adding-machines? >OK, now this is where I draw the line. I use and HP calculator. Many of my >friends use HP calculators. But, consider how HP calculators are used - you >sit down, you type the numbers & the operators and you get the result. What >you are doing is "writing" code. You are not reading it. RPN is easy to >write. Yes, it is intuitive to write. But not to read. You have to learn >to do that. And many times it take a lot of work. > >As a disclaimer, I want it noted that I like the basic idea behind forth. >It is elegent. And there are some neat things you can do with it. And it >is small. I like forth since I first learned about it in 82? when Byte did >an issue on it. I just don't like the syntax WITH REGARDS TO ARITHMETIC >EXRESSION (I have no problems with the RPN of procedure calls, although >control statements are a minor hassle - this is something you can get use >to). I don't really see the problem. Well factored Forth keeps most of the mathematical "noise" at a low level. And, I have really had no problem mastering reading *well written* RPN (I hate reading badly written RPN, however, these are the areas in which comments get real important). -- Dave Weinstein Internet: olorin@walt.cc.utexas.edu UUCP: {ames,utah-cs,uunet}!ut-sally!ut-emx!{walt.cc.utexas.edu,juniper}!olorin GEnie: DHWEINSTEIN