home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / database / informix / 2719 < prev    next >
Encoding:
Internet Message Format  |  1992-12-15  |  2.5 KB

  1. Path: sparky!uunet!munnari.oz.au!comp.vuw.ac.nz!waikato.ac.nz!aukuni.ac.nz!kcbbs!nezsdc!hugh
  2. Newsgroups: comp.databases.informix
  3. Subject: Re: Suggested Changes to 4gl
  4. Message-ID: <1992Dec15.230454.7421@nezsdc.icl.co.nz>
  5. From: hugh@nezsdc.icl.co.nz (Hugh Grierson)
  6. Date: Tue, 15 Dec 92 23:04:54 GMT
  7. References: <1992Dec14.215058.24334@netcom.com>
  8. Organization: Fujitsu New Zealand
  9. Lines: 53
  10.  
  11. In article <1992Dec14.215058.24334@netcom.com> pmahler@netcom.com (Paul Mahler) writes:
  12. >So far the only responses I have received have been suggestions
  13. >for changes to the input array statement. Is everyone really
  14. >this satisfied with 4gl?  Is there nothing else we can 
  15. >complain about?
  16.  
  17. 1) inadequate INPUT ARRAY
  18. 2) no dynamic memory allocation (eg dynamically sized arrays)
  19. 3) no pointer variables, or "call by reference"
  20.  
  21. 4) strange syntax restrictions,
  22.    eg "DISPLAY some_function()" is illegal
  23.  
  24. 5) mismatch between semantics of some 4GL and SQL language constructs
  25.    eg: in the following code fragment:
  26.      DEFINE x RECORD LIKE y.*       (1)
  27.      SELECT *            (2)
  28.          INTO x.*            (1)
  29.          FROM y
  30.     the ``*'' in (1) are expanded to the list of columns at compile time,
  31.     while the ``*'' in (2) is expanded at run time.
  32.  
  33. 6) Cursor and window names cannot be constructed dynamically (nor is there
  34.    any other method of having multiple instances of the same window or
  35.    cursor open simultaneously).  [Aside: it would also be nice to be able to
  36.    pass window or cursor references as arguments to functions]
  37.    Therefore certain recursive algorithms become difficult.  Consider how
  38.    you would implement this pseudocode for a simple tree walk...
  39.  
  40.     # start with: call walk_tree(rootnode, 1, 1)
  41.     function walk_tree(startnode, row, col)
  42.         open window <windowname> at row,col
  43.         foreach cursor <fetch_children> into child_node
  44.         display child_node
  45.         do-some-interactive-work
  46.         call walk_tree(child_node, row+1, col+1)
  47.         end foreach
  48.         close window <windowname>
  49.     end function
  50.  
  51.  
  52. Well, those are the ones that bug me.  
  53.  
  54. Who was it who said "Informix 4GL isn't a `4G' and is hardly an `L'"?
  55. Harsh, but fair.  I must say that I like the Online engine, but really
  56. sometimes I wish we were developing apps in C instead of 4GL.  
  57.  
  58.  
  59. -- 
  60. Hugh Grierson          Fujitsu/ICL New Zealand - Software Development Centre
  61. hugh@nezsdc.icl.co.nz                Speaking for myself only.  See figure 1.
  62.     Quote of the decade: "We're not just talking about unpopulated areas
  63.      of the Southern Hemisphere anymore" [Pres. Bush, on the Ozone hole]
  64.