[OT] Python like lanugages [was Re: After C++, what with Python?]

Tim Harig usernet at ilthio.net
Mon Jan 17 16:07:42 EST 2011


On 2011-01-17, geremy condra <debatem1 at gmail.com> wrote:
> On Mon, Jan 17, 2011 at 1:12 AM, Tim Harig <usernet at ilthio.net> wrote:
>> On 2011-01-16, geremy condra <debatem1 at gmail.com> wrote:
>> I wouldn't say Go is narrowly targeted.  It's a systems language that can
>> compete in the same domain with scripting languages.  It is true that most
>> languages have long incubation periods; but, corporate support can change
>> that quite a bit.  C#, being backed by Microsoft, managed to go mainstream
>> pretty quickly.
>
> This seems... shall we say, overly optimistic. I've seen no evidence
> at all that Go is even trying to compete with scripting languages, and
> I don't know of anyone who would actually use it where a shell script
> might do. AFAICS, it is an unabashedly concurrency-centric systems

I don't write Python where shell scripts will do either.  I have rewritten
several simple Python scripts in Go.  I will not be leaving Python
completely; but, Go will likely replace Python for most of my large scale
programming needs.

> might do. AFAICS, it is an unabashedly concurrency-centric systems
> language for people who are willing to sacrifice some speed and
> control for legible code. That's not an impossibly narrow niche (and
> it certainly has deep pockets) but it *is* narrow compared to a
> general purpose language like Java or Python.

You are writing Go into far too narrow of a niche then it actually is.  In
fact, whatever language you are commenting on doesn't sound like Go at all.

Go is every bit of a general purpose programming language.  It is useful
for the same basic applications that you would otherwise write in Java.  It
can do pretty much anything that you can do in C, with the probable
exception of writing operating systems.  I have been using C/C++ for most
of my programming career; but, everything that I have done can be done with
Go.  I am not really sure where you are seeing such narrowing limitations.

Support for concurrency is really icing on the cake.  I find it rather
supprising that so many modern languages do not already support full
concurrency constructs.

>>> Python's very widely used for scripting and related tasks, and has a
>>> pretty big user base in academia and the sciences.
>>
>> Python has been widely used by people like us that happen to like the
>> language and found ways to use it in our workplaces; but, most of the
>> time it is an unofficial use that the company.  You still don't see many
>> companies doing large scale internal development using Python and you
>> definately don't see any doing external developement using a language
>> that gives the customers full access to the source code.
>
> Right, I mean, it's not like the company that wrote Go would *ever*
> stoop to using Python ;)

I have never said that there are not companies doing developement in
Python and certainly not for web programming; but, a handful of companies
that have adopted Python doesn't make it mainstream.  Good luck finding
many Python jobs in my area.  Java, C#, Visual Basic, PHP, *COBOL*,
RPG-IV, and, to a lesser extent, C++ jobs are available in abundance.
The few Python jobs that are available are for web based programming.

>> 1. Go has an object model.  What it lacks is an object hierarchy where all
>>        object are decended from a single root "object" since it does
>>        not support object inheritance as it is used in most languages.
>>        In Go we simply adapt an object to meet the needs of the newer
>>        object by adding whatever new functionality is needed.
>
> Go has structs. Its structs are not objects, principally because they
> can't do real inheritance. You can do similar things ('structural
> inheritance') to C structs, and nobody argues that C is OO.

http://www.infoq.com/interviews/johnson-armstrong-oop

Listen to the third point.  Object orientation is quite possible even
without inheritance.  Not all programming languages support the same set
of OOP features.  Not all classless OOP programming languages support
inheritance.  The basic definition of object oriented programming is
programing with self contained objects which contain their own data and
the procedures necessary to manipulate that data.

>> 2. Go has a similar mechanism to exceptions, defer/panic/recover.  It does
>>        downplay
>
> Defer, panic, and recover only allow you to build a recovery stack.
> That's like saying that try/except isn't needed anymore because you
> have the with statement. Do you think you could get through a rewrite
> of Django without ripping out some hair over that?

I don't know what you are referencing about Django as I don't work on or
with the project; but, if one wanted exceptions with similar sematics to
Python's, it could easily be built around Go's defer/panic/recover.  There
are actually packages availble that recreate exceptions as they are used in
Ruby and other languages.  The only think defer/panic/recover lacks is an
exception class containing more more detailed information about what
actually went wrong.

>> The current
>> interest in functional programming stems merely because some announced
>> that it would be *the* way to utilize multicore computers.  Having looked
>> into the space somewhat, there is more hype then substantiation for
>> purely functional concepts.  What the hype did do was return attention
>> to SCP style concurrency using actors and MPI and I think that will be
>> the direction taken for concurrent programming into the future.
>
> I'm not an expert in concurrency and can't evaluate the claims many
> are making in that space. I know that I still find writing highly
> parallel programs easier in C and Python than I do in Haskell, but I
> seldom wind up thinking that concurrency was the hard part of the
> problem I was solving.

I don't know much about Haskells concurrent programming constructs.  If you
have found concurrent programming easy, then your problems probably don't
involve many shared resources.



More information about the Python-list mailing list