Do you consider Python a 4GL? Why (not)?
Laurent Pointal
laurent.pointal at free.fr
Tue Jun 11 15:48:52 EDT 2013
Dennis Lee Bieber wrote:
> On Tue, 4 Jun 2013 18:17:33 -0700, Dan Stromberg <drsalists at gmail.com>
> declaimed the following in gmane.comp.python.general:
>
>
>> Perhaps "Scripting language" is the best general category we have that
>> Python fits into. But I hope not.
>
> Heh... Having encountered ARexx (the Amiga version of REXX), Python
> is NOT a scripting language... The ARexx implementation (along with the
> Amiga's interprocess communication system) allowed for scripting any
> application that opened an "ARexx Port"... Other than, maybe, the
> original IBM REXX, I've not seen any other REXX implementation that
> would permit embedding application specific commands into a script.
>
> Python's subprocess (and related) are all based on explicit startup
> and communication over stdin/stdout... Nothing like:
>
> address TextEditor /* a fictitious application port */
> 'DN 5' /* move down five lines *?:
> 'MARK' /* start a selection */
> 'RW 5' /* move right five words */
> 'COPY' /* copy selection to operation result */
> string = result
> address PageSetter /* fictitious here, but a real program */
> 'PASTE' string /* insert selected string into page document /*
>
> Yes, maybe the above could be done as two sessions of subprocess --
> presuming both programs had a command line interface. But what if the
> script was going to switch between the two of them throughout one
> session.
For me this is not a DSL, but an external API of an application, like you
have with COM under Windows, DBUS under Linux. Unix streams are just an
ancestor way of communication, you could have local-RPC also, or CORBA.
So, as this is just inter-process communication procotol, if you have the
Amigaes interprocess communication system tool written for Python, you could
easily write things using a Python syntax:
te = TextEditor()
te.dn(5)
te.mark()
te.rw(5)
te.copy()
string = te.result()
ps = PageSetter()
ps.paste(string)
Python is a scripting language, and a nice one to use as glue between
different components, eventually of different technologies.
(note: if you have more than one process to control via streams, you can
open more than one pipe)
And... here http://www.solie.ca/articles/pythonmod/pythonmod.html
you could find modules for using Python with Amiga APIs and combining it
with ARexx.
> The C compiler suites used this ability to read the error log from a
> compile, and move to the line/column in the source file associated with
> each error. (Before "integrated" development environments)
This is a + for compiled environments that you effectively cannot have with
Python, non-syntaxic errors found at runtime.
A+
Laurent.
--
Laurent POINTAL - laurent.pointal at laposte.net
More information about the Python-list
mailing list