home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / amiga / programm / 19312 < prev    next >
Encoding:
Internet Message Format  |  1993-01-21  |  4.3 KB

  1. Xref: sparky comp.sys.amiga.programmer:19312 comp.sys.amiga.misc:20636
  2. Path: sparky!uunet!europa.eng.gtefsd.com!emory!sol.ctr.columbia.edu!spool.mu.edu!yale.edu!ira.uka.de!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!uknet!edcastle!hwcs!hwcs!neilg
  3. From: neilg@cs.hw.ac.uk (Neil MG Gall)
  4. Newsgroups: comp.sys.amiga.programmer,comp.sys.amiga.misc
  5. Subject: Re: Strange wierdness in E-language!
  6. Message-ID: <1993Jan28.132457.19610@cs.hw.ac.uk>
  7. Date: 28 Jan 93 13:24:57 GMT
  8. References: <1993Jan25.160550.9255@abo.fi>
  9. Sender: news@cs.hw.ac.uk (News Administrator)
  10. Organization: Department of Computing and Electrical Engineering, Heriot-Watt University, Edinburgh
  11. Lines: 83
  12.  
  13. In article <1993Jan25.160550.9255@abo.fi>, MSAASTAMOINE@FINABO.ABO.FI (Mika Saastamoinen Tkkk) writes:
  14.  
  15. ** 
  16. ** IF ((sx>LFEDGE AND sx<RGEDGE) AND (sy>TOEDGE AND sy<BOEDGE)) THEN Plot(sx,sy,2)
  17. ** 
  18. ** Now then, guess what that did? It plots the pixel no matter what the coordina-
  19. ** tes are! And yes, I did check those boundary values, which were defined in 
  20. ** CONST statements, and they were correct! The funny thing is that when I conver-
  21. ** ted my test program to C, the above if-statement worked correctly, ie. clipped 
  22. ** the pixels within the boundaries! Now is this strange or what?
  23.  
  24. Not really.  All expression evaluation in E is done left-to-right: THERE
  25. IS NO OPERATOR PRECEDENCE.  So your expression actually is evaluated as:
  26.  
  27.     IF ((((sx>LFEDGE) AND sx)<REDGE) AND sy)>TOEDGE) ...
  28.  
  29. which is obviously a load of cack.  What you want is
  30.  
  31.     IF (sx>LFEDGE) AND (sx<RGEDDE) AND etc...
  32.  
  33. * Another thing was this: 
  34. **     This statement works:               IF tz<0 THEN...
  35. **     This statement crashed my machine(!): IF (tz<0 AND tz>-300) THEN...
  36.  
  37. Same problem.  Crashing might have been due to tz>-300 -  try tz>(-300)
  38. Sorry - I can't help you with the SELECT..ENDSELECT problem.
  39.  
  40. ** Also, as many others, I too don't 
  41. ** like the one-source-file-philosophy of E, nor do I like the (upper)case-
  42. ** sensitivity of it.
  43.  
  44. I downloaded E this week, and spent Monday evening perusing the documentation,
  45. and trying out a few examples.  I *WON'T* be using E (at least until a better
  46. version comes out) for the following reasons:
  47.  
  48.     * NO OPERATOR PRECEDENCE
  49.       this leads to really messy expressions, as well as confusing
  50.       people - look at the example above
  51.  
  52.     * NOT STRONGLY TYPED
  53.       weak typing in a procedural language is plain confusing, and
  54.       anyone who's used C++ will know that strong typing finds a large
  55.       proportion of programming errors at compile time
  56.  
  57.     * ONLY ONE SOURCE FILE
  58.       so useless for programs bigger than about 10Kb
  59.       
  60.     * NO COMPILATION TO OBJECT FILES
  61.       how are you supposed to link code written in E with code written
  62.       in C ?  If E created .o files, then you could get the linker to
  63.       generate overlays, etc too.
  64.  
  65.     * SHITE PARSER
  66.       the parser should **NOT** decide what an identifier means by
  67.       the case of its letters - come on, get out of the stone age.
  68.       Along with this comment I should say, case sensitivity is fine,
  69.       but reserved words should be lower case.
  70.  
  71.     * I HATE THE WORD PROC
  72.       never liked BBC Basic.  Are the keywords PROC..ENDPROC really
  73.       needed ?  what's wrong with: function_name()...end;
  74.  
  75. Apart from these, there are some really neat features of E, like the
  76. AmigaDOS integration, exception handling etc.  If an OOP version becomes
  77. available, with operator precedence, strong typing, more than one source
  78. file, a good parser, compilation to object files, and *proper* object
  79. orientedness (word?) (ie: friend classes, operator overloading, multiple
  80. inheritance etc) then I would program some of the more boring parts of
  81. my programs in it (the tricky bits I would stick to C for, at least until
  82. I was sure that E was up to the job).
  83.  
  84. All in all, I was sort of glad that E wasn't up to scratch - you don't
  85. pay 120 quid to upgrade to SAS/C 6 for it to be made obsolote by a PD
  86. package, do you !?!
  87.  
  88. I heard someone say "Can't wait til GadToolsBox can output E code".  If
  89. E was more professional, GadToolsBox wouldn't need to.  You just compile
  90. the C code, and link with E program.
  91.  
  92. +-----------------------------------------------+------------------------+
  93. |  Blessed are they who Go Around in Circles,   |     Neil M.G. Gall     |
  94. |      for they shall be known as Wheels.       |   neilg@uk.ac.hw.cee   |
  95. +-----------------------------------------------+------------------------+
  96.