Re: 3GL vs. 4GL [was: Re: LSP and subtype]



Responding to Huber...

So what's a language that's not poorly formed?



I must have missed that answer...


From a purist OOA/D viewpoint they are all poorly formed; its a matter
of degree.  Some things, like procedural message passing, are
intrinsic to being 3GLs.  Some things, like the attribute access mess,
they fix
after a few decades.  Some things, like implementation overrides in
inheritance they haven't gotten around to yet.


Didn't I hear you saying that implementation overrides are fine under
certain circumstances (the FileStream discussion)?

Right. Lacking another mechanism to deal with that, then one needs the feature. But that doesn't mean the language designers shouldn't try to eliminate the general foot-shooting by addressing the exceptions directly or limiting the use of the feature. IOW, don't provide a very general mechanism whose sole valid use is for one or a few very special circumstances -- especially when using it in other circumstances leads to problems that defeat the overall paradigm's goals.


But OOPLs are crippled by being 3GLS and are
necessarily bound closely to hardware computational models.



Oh, are they? How is the Java language bound to a hardware computational model? Or would you say Java is 4GL?


Java a 4GL?!?  Surely you jest; it's barely a 3GL!.  Any language that
employs procedural message passing and block structuring is a 3GL. The
3GLs are very closely mapped into the hardware computational
models of Turing and von Neumann and that permeates everything from
syntax to the graph algorithms used for scoping.


I suspect this won't lead anywhere. Let me rephrase my original
question: What *exactly* can one do in a 4GL that cannot be done in a
3GL like C++, Java, C# augmented with appropriate libraries?

This is a variation on the argument that if you give me a big enough computer and enough time, I can model the universe in real time. B-) If you provide enough library augmentation for emulation, you can do pretty much whatever you want. For example, I can provide a linear programming library, a dynamic programming library, a monte carlo library, etc. for C and solve any operations research problem. But that doesn't make C an operations research language. The issue is the language itself and its execution model. Concurrency is an example of something that could be inherently handled in a 4GL but is not directly supported in any popular 3GL.


But, as I said, IMO the most useful definition of 4GL is that it is independent of specific computing environments. Since each 3GL represents a specific choice within a specific computing environment, none qualify. In fact, there are RTOS environments where there no flavors of 3GL compilers available at all but a 4GL should be able to produce an executable for such an environment (and some actually do).


For example, the
Java execution model is a pure synchronous model.  Any support for
concurrency is
provided by thread library overlays that /emulate/ concurrency through
time slicing.


Excuse me? Are you saying a 4GL has a better way of doing concurrency?

Not quite. I am saying that no popular 3GL directly supports concurrency. All of them require augmentation through emulation that some developer provides in library software or that is just a wrapper around OS-provided time slicing. [That will probably change with the popularity of multi-processor systems as soon as the academic boffins catch up and provide some new hardware models. But until then optimization will be pretty simplistic.]


I am also saying that in a 4GL (my definition) it is irrelevant. For example, the execution model for UML action language is sufficiently generic that it doesn't matter whether the implementation is concurrent or not. The UML application solution description is complete, precise, and unambiguous either way.

However, one can conceive of 4GL definitions where the primary execution model of the language itself is concurrent. There are specialized languages like HPVEE that provide an inherent execution model for parallel propagation of signals through electronic systems. (I hesitate to call such languages 4GLs because they are so specialized, but concurrency is fully supported in an intrinsic manner.)


************* There is nothing wrong with me that could not be cured by a capful of Drano.

H. S. Lahman
hsl@xxxxxxxxxxxxxxxxx
Pathfinder Solutions  -- Put MDA to Work
http://www.pathfindermda.com
blog: http://pathfinderpeople.blogs.com/hslahman
(888)OOA-PATH



.



Relevant Pages

  • Re: RFC: C and concurrency (as CC extensions)
    ... I do see some places where concurrency can be ... As far as libraries go, obviously there is already support for ... If you are thinking about extending or breaking the language, ... common constructs in concurrent programming can be built out of others; ...
    (comp.lang.misc)
  • Re: Container Library recommendations?
    ... What Ada libraries, that are in common use, would you recommend are best ... suited to different platforms when concurrency is involved. ... Ada is a building-block language. ...
    (comp.lang.ada)
  • Re: C++0x and Threads - a poor relation to Adas tasking model?
    ... libraries just don't have the interface "right?" ... language support over library-based API. ... Adding the concurrency features at the ...
    (comp.lang.ada)
  • Re: The Eiffel Compiler tecomp version 0.8 released.
    ... implementing the full language. ... reclaims all not reachable objects (as opposed to a conservative ... I have not yet decided what to to about concurrency. ... The most simple thing would be to offer some libraries with classes ...
    (comp.lang.eiffel)
  • Re: What doesnt lend itself to OO?
    ... I would argue that qualifies as 3.nGL. ... > abstractions for concurrency, IMO that would bring n closer to being ... processes (it was the language for Inmos' transputers in the 80s or 90s, ... Java was the first one to incorporate ...
    (comp.object)