View Single Post
Old 2019-11-04, 16:34   #3
If I May
chalsall's Avatar
"Chris Halsall"
Sep 2002

3×43×79 Posts

Originally Posted by Nick View Post
The reasons you have given so far for using python apply to most interpreted languages. It would be more interesting if you contrast python with other popular languages too.
Indeed. There are many excellent languages out there, and it is good to know many.

Most of the more modern ones are interpreted (or JIT-compiled) because, frankly, computers have become so fast that human time is now more valuable than the computer's (wasn't the case early on). Except for rarified cases (such as George's hand-crafted assembly, running on hundreds of thousands of computers), its OK if compute is "wasted" interpreting code.

With regards to contrasting languages, that /can/ quickly degrade into (sometimes heated) language wars...

I, personally, don't like Python because it uses whitespace for code blocking. As an old-school C / Perl et al guy, I take some exception being told how I'm allowed to format my own code. That should be up to me, in my opinion.

I also disagree that Python is always "easy to read". Not always -- it depends on the author, and their use of whitespace and comments to make the code readable. Dylan has shown some excellent examples of fairly readable Python.

The truth, though, is for most people being introduced to computer programming for the first time, Python isn't the worst choice. Lots of support out there, and as Colab and Kaggle demonstrate, easily available "in the cloud".

Just to share, I know a certain university near me that is still teaching their undergraduates C as their introductory language.

Now, I love C, and serious programmers should be comfortable with it. But, as the saying goes, C has "all the power, and all the safety features, of a chainsaw"...

Even the most basic string-filtering with sorting exercise quickly gets into pointers, which then leads to the "human" dealing with memory and garbage collection, etc.

IMO, an excellent way to scare the hell out of a student...

And, if I may please lastly say, I really do encourage people to at least be also familar with Perl. It really is the "Internet's Duct-tape", used to glue software components together.

Not that difficult to read, and it does strings in its sleep.

chalsall is online now   Reply With Quote