Re: 4gl: Better than sliced bread?
Posted in 1993
In article <1stvscINN9c5@emory.mathcs.emory.edu> alan@effluvia.den.mmc.com (Alan Popiel) writes: >->>Our first version of the general_view_screen system was >->>extremely awkward, due primarily to the lack of function pointers in 4gl. >-> >->I'm having fun in c.d.i today. Is this an example of one of the powerful >->features of 4gl that give you that ten-fold productivity increase? >-> >->Hmmm, given the lack of function pointers, the creation of any kind of >->abstract data type would be nigh on impossible. Well, who needs software >->engineering anyway? Real Men (tm) don't write generic functions. Useful >->function libraries? Bah -- who needs 'em? >-> >----------------------------- >Golly, I'm starting to sound like an Informix flack, rather than just a >satisfied user. However.... > >I have written entire, complex applications in 4GL using the SE engine, >including a multi-task, multi-window application in which the separate, >asynchronous tasks periodically sync'ed thru the database. This applica- >tion ran flawlessly (well, the flaws were mine, not Informix 4GL's) thru >X-windows over a 2,000 mile network link. > >The only C function I ever needed was 'i_getenv()', which was written >before 'fgl_getenv()' became available. OK, point taken. 4GL can (probably) do some pretty good stuff (and I only say "probably" because I've never used it myself). As someone who uses pointers to functions *a lot*, this comment: >->>Our first version of the general_view_screen system was >->>extremely awkward, due primarily to the lack of function pointers in 4gl. bothers me. OK, so most people don't do stuff that really requires function pointers very often. (Pilots *rarely* need their parachute, too, but I'd hate to be without one! :-) >I've written reuseable libraries; at least I reused the same code, in *.o >form, in several different projects. Code reuseability is more a function >of designer/programmer cleverness than of language power. My only quibble with the above is this: Does 4GL give you something like #include files where you can put function prototypes, so you get things like parameter type checking? I remeber the Bad Old Days, before ANSI-C, and I never want to go back! OK, I have one other quibble. Would it be possible to write something like qsort() in Fortran (or, for that matter, in 4GL)? To do qsort cleanly, you *need* pointers to functions (or their equivalent). > Remember Fortran? I had blotted it out. Thanks for reminding me. :-) >I also doubt a *sustained* 10X increase in productivity. It depends on >what you are doing in your application. As the car dealers say, "Your >mileage may vary." Once you buy into the look-and-feel of what 4GL does >easily and well, such features as MENU statements and OPEN WINDOW do >indeed produce a high productivity gain, versus doing the same thing >from scratch in C. Please see my previous posting regarding MENU. ^^^^^^^^^^^^ That's the key. No decent C programmer would ever *consider* doing it from scratch. He'd either buy a library that does it, or write it once, and put it in a library. Then he gets the productivity gain of having OPEN WINDOW et al., and he doesn't have to suffer through some of 4GL's shortcomings. That said, I concede that 4GL could well be a good tool that helps to write a certain class of applications. It's also probably easier to use than C in some senses, and almost surely easier to pick up than C. But I still like C better! (I also think that Forth is kinda neat, so maybe there's no hope for me :-) -- Bill Foote bill@pds.com PDS Corp, Los Angeles, CA USA uunet!promdist!bill