|
On Mon, Jul 6, 2015 at 11:51 AM, Jon Paris <jon.paris@xxxxxxxxxxxxxx> wrote:
Not sure I understand the logic on the “good fit” front.
Well, Justin specifically mentioned syntax. It's certainly at least
partially subjective, but my own feeling is that Python has the "least
weird" syntax among Ruby, PHP, and Python, for folks used to RPG and
CL.
Another way to put this: If you take someone who knows RPG and CL, but
none of the other three languages, and you put a representative,
idiomatic sample of each of those three languages in front of them,
which one will they find the least "foreign-looking"? My contention is
that they are most likely to choose Python. But I have not tested this
in anything resembling a scientific manner.
So if anyone has disagreements with me regarding syntax, I'm not
inclined to argue.
The biggest challenge for most RPGers making the switch is generally the OO aspect. That’s is why PHP has worked for many - because you can write procedurally while exploiting objects written by others. Admittedly I have not (yet) studied Python in depth, but everything I have seen to date tells me that it is even more strongly OO than Java.
Despite what Buck says (and his opinion is a very useful one here,
because he is precisely the demographic we're talking about), the fact
is that Python is *in the sense you are implying* much, much less
object-oriented than Java.
In Java, you can't do anything at all without a class. You literally
cannot write a valid, working Java program without writing a class.
But in Python, you don't need to use classes at all. Python is
perfectly happy being used in a completely imperative/procedural
fashion. In this respect, it's the same as what you are describing for
PHP.
The following single line is a valid and working Python 3 program
(I'll use Python 3 because that is what IBM has released):
print('Hello world!')
When I say "single line" I mean literally one line. There is no extra
boilerplate that is "standard to all Python programs" that I'm leaving
out for convenience. Just put that ONE line into a file and it's ready
to be executed by Python.
If you prefer the classic Basic "GOTO 10" infinite-loop version of
hello-world, it's the following two-line program:
while True:
print('Hello world!')
Clearly, no classes or indeed any overt object orientation involved at all.
All that being said, what you and Buck have found about Python being
"more strongly" OO than Java is not invalid either. Python does have
deeper and more powerful support for OO than Java does. It's just much
more flexible about it. (It could be argued Ruby's OO is deeper and
stronger still, but you don't seem to be discussing Ruby at all.)
I’m interested as to why you two think it works better than (say) Java.
Well, neither Justin nor I said Python "works better" than Java. (I
happen to believe that it does, but I wasn't arguing that in this
thread.)
Now, do you mean "why do we think Python is more accessible to RPG and
CL programmers than Java is"?
John Y.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.