
Is Python the Future of Programming? - submeta
https://m.slashdot.org/story/343638
======
booleandilemma
How are people writing large programs in Python? Isn’t the lack of compiler
type checking making it difficult? And what about lack of access modifiers?
People aren’t bothered by this?

For programs less than 500 lines, I have no issues with Python, but it feels
to me like Python just isn’t suited for large-scale programming in the way C#,
Java, Go, or Rust are.

~~~
bnchrch
I think programmers often misinterpret what’s hard about building large
projects.

It’s not correctness it’s communication. A type checker will save you from
small errors but well written and easily understandable code will save you
from a lot more.

Not saying readability is harder in c# java go or rust just that the type
system doesn’t help with it that much.

~~~
StavrosK
As a Python developer, I love type annotations on function signatures because
they're great, up-to-date documentation. I don't care so much about them being
checked, I care that they make the function _much_ easier to read and reason
about.

~~~
speedkills
If they weren’t checked, how would you know they are up to date?

~~~
StavrosK
I don't care how they're updated, I just care that they are. If that's by
checking, it's fine by me.

------
ausjke
I have never got serious about python until very recently(I mean about one
week), the more I dive into it the more I am convinced yes python is the
future in the sense it does the below:

    
    
        replacing BASIC(i.e. good for beginners)
        replacing Java in colleges for intro to programming
        replacing matlab(ipython jupyter)
        replacing R for ML and big data
        great for web scraping
        replacing Perl and probably shell scripts for CLI scripting.
        strong backend framework candidates such as flask and django comparing to php/javascript frameworks too.
        micropython runs on resource constrained systems so it can replace Lua there.
        C friendly so you can optimize performance bottleneck when there are any.
    

The only missing area I can see, is that it is not designed for html/css/js
frontend, so you have to use javascript there.

yes, Python could be the future of programming.

~~~
lykr0n
I think the one area that Python won't fit in is low level languages such as
C/C++. I can easily see Rust taking over that space.

Java is never going to go away, but let's hope Scala becomes more popular.
Neither is C#.

I'm not really sure where Go fits into the picture.

~~~
tonyarkles
> I think the one area that Python won't fit in is low level languages such as
> C/C++

What Python is _really_ good at, though, is gluing together/scripting C/C++
code. I've had a lot of success in my career starting a project in Python, and
then dropping down to C or C++ for the high performance bits. As an example, I
worked on a software-defined radio project with some errr... special
requirements. All of the modulators etc were all written in C, and the
bitstream generation/manipulation was done in Python. There was also a bunch
of numerical processing bits (solving diff eqs with RK4) written in C++,
parameterized by Python. The net result was that we could use a Python REPL to
experiment and script the system, while handily using all of our CPU cores to
their maximum capacity.

------
mayniac
Python is stupidly simple and that's the reason I use it for 99% of my work
(netsec/forensics).

I introduced my ex to it for her dissertation in astro-physics. It took her
under a week to mainly self-learn and start writing scripts with numpy and
matplotlib, and it was her first language. The code wasn't _good_ by
professional standards, but it did the job. I cannot think of any
programming/scripting language which can be learned by someone with no
previous programming experience in under a week at a level where it can be
used in a masters dissertation.

~~~
Walkman
NO, Python is not simple at all, especially nowadays with all the asyncio
stuff and tons of new features in 3.4+. One can't even follow what's happening
with the language.

I don't understand where this nonsense is coming from. Probably ignorance? You
might not know too much about it to understand how huge and complex Python is.

~~~
bsder
It depends.

I can have an intern up and programming basic Python in about 3 days from
nothing. I have run this experiment multiple times with teenagers.

The nice part about Python is that I can _gradually_ introduce them to new
features as they hit the problems the features are meant to solve.

And, I _WILL_ argue that Python's syntax is easier to keep in your brain.
Somewhere on HN there was an article showing the grammars of various
programming languages as connected graphs, Python was quite obviously simpler
than just about everything else.

~~~
Someone
Possibly
[http://blog.nicksieger.com/articles/2006/10/27/visualization...](http://blog.nicksieger.com/articles/2006/10/27/visualization-
of-rubys-grammar/). A comment links to
[http://flickr.com/photos/nicksieger/281055485/](http://flickr.com/photos/nicksieger/281055485/)

------
noir_lord
I'd sooner Python be the future than JavaScript.

I think it's more likely to continue to be the future of glue languages.

Many problems can be solved in Python directly and when they can't you can
often call out to something to do the heavy lifting.

For that I've found it absolutely excels.

~~~
ctvo
I’m having trouble thinking of a dynamic language in Python’s class (Ruby, JS,
even PHP) that fails your use case here.

~~~
hexane360
The implicit part you're missing is that Python is just _nice_ to work with in
a way that JS and PHP aren't (I don't have Ruby experience).

If there's a bunch of languages that meet the baseline functionality, why not
choose the most ergonomic of the bunch?

~~~
noir_lord
Pretty much and Python has massive library availability _and_ consistently
_good_ libraries (PHP and JS have lots of libraries but the quality is...meh
and to an extent they silo much more than in Python - though both languages
have at least improved their (PHP with composer and PSR/FIGS and JS with
npm/ES6 imports)

------
amorphid
I've never been a heavy Python user myself, but I 'm working in Elxiir w/ a
couple other people who are/were heavy Python users. They seem to much prefer
Elixir/Erlang's concurrency model over Python's. Scanning the article, I don't
see any mention of concurrency, and concurrency seems to be an increasingly
valuable tool in a micro service world.

Does anyone here have a preference for using Python to tackle concurrency-
related issues? If yes, I'd love to hear your thoughts on the matter.

~~~
Walkman
Very good question! Python have a couple of tools to handle concurrency and
parallelism, but it's a mess.

For I/O bound programs, you can use threading (in stdlib). For CPU bound, you
can use multiprocessing (also in stdlib). But these have huge overhead, (e.g
starting a Python thread costs 32kb memory minimum.) and there are multiple
solutions in the stdlib like ThreadPoolExecutor and ProcessPoolExecutor in
concurrent.futures beside the threading and multiprocessing modules...

If you want to write async code, there is tornado with callbacks, tornado with
the new async stuff, asyncio (tulip for Python2), the new async/await from 3.5
which is very immature. The async part of the ecosystem is like a totally
separate whole new world, you can't really mix and match or pick parts from
the other, however, there are brave folks like Andrew Godwin how tries to make
Django async with not moderate success.

For web frameworks, there are a ton of servers which might fit you, but they
are mostly very complex to set up or reason about like greenlets, pre-forked
web servers and stuff.

I have 5 years experience with Python, using it every day and once I tried to
write a custom SSH server and it took 1-2 weeks to grasp Tornado fully, then I
tried the same with Go and WITH LEARNING THE LANGUAGE itself, it took me about
2 weekends and my server was up and running!

TL;DR: You can write concurrent code with Python but it's a mess and you will
probably have a hard time.

------
zengid
I'm not sure. I see so much money being poured into making scripting languages
faster [0], and with the "End of Moores Law" in sight I feel like the industry
is going to be leaning towards static languages [1].

Perhaps developments in gradual typing will allow for the benefits of quick
and experimental development (scripting) that can later be calcified into a
sturdy fully-typed program with higher performance (through optimized AOT
compilation).

[0] [https://instagram-engineering.com/dismissing-python-
garbage-...](https://instagram-engineering.com/dismissing-python-garbage-
collection-at-instagram-4dca40b29172)

[1] [https://youtu.be/Azt8Nc-mtKM?t=9m59s](https://youtu.be/Azt8Nc-
mtKM?t=9m59s)

~~~
zzzcpan
AOT compilation doesn't really solve the problem. You also need to get closer
to the metal with the language, data types, algorithms, only then you can get
significant performance increase. But this only postpones the problem,
hardware is still capped by the end of Moore's law and will push you into
concurrency and distributed systems sooner or later. And which language does
it better will be an important factor.

------
alfin3
Wait, wasn't Java the future of programming?

~~~
oddity
For the 90s, yes. That future happened and now we're looking at a new one. For
as much as I dislike the language and most of the software built on the JVM, I
do think it helped advance the world of application-level software development
to a better place.

Without it, people would likely have built the same memory-hungry, slow, and
bloated software, but in C++ with all its added risks, lessened portability,
and none of its advantages (except maybe better start-up times). There are
more problems that need fixing, but Java at least solved some of them.

Edit: Java, and other languages and systems like it, really. Java had the
advantage that it was familiar to C++ programmers.

------
nicodjimenez
Python does have two growth vectors going for it right now:

1) Deep learning / data science works really well in Python

2) Lambda functions are really great in Python... maybe people will choose to
write servers out of Lambda functions instead of writing high performance
servers in Go - who knows?

Those are big areas, but still a small percentage of all programming work
falls into those two categories.

~~~
Walkman
Sorry, but you don't have no clue what you're talking about.

Python is an imperative language by nature, and lamdba is very uncomfortable
to use for anything than a simple expression. You can use functional elements
up to a certain degree, but it will be a pain if you try to force it to be a
functional language; you simply can't go very far with it.

~~~
jlrbuellv
I think he means AWS lambda functions, which are super easy in python

------
mjw1007
I'm surprised to see this bit:

« I certainly didn't set out to create a language that was intended for mass
consumption » [Guido van Rossum] explains.

As early as 1999 he was one of the authors of the "Computer Programming for
Everybody" DARPA funding proposal, which was supposed to be based on Python.

See
[https://www.python.org/doc/essays/everybody/](https://www.python.org/doc/essays/everybody/)
.

~~~
zokier
1999 would be a decade after van Rossum started working on Python.

------
jokoon
Python in particular, maybe not.

But the nature of the language, its simplicity, its indenting style, its
readability, obviously yes. Those were big improvements on the C language it
was inspired from.

I don't think python will survive its lack of performance, although I really
wish it would.

------
jaequery
Python is one of the simplest language you can learn. It is really nicely
designed and executed. If simplicity is the goal, Python has that in spades.

~~~
jzwinck
Lua is far simpler, and still easy to learn. Yet it's powerful enough to be
used in "real" projects (e.g. Photoshop Lightroom).

~~~
bsder
Lua comes in quite high on the "Most Dreaded" list of programming languages
and has 1-based indices in a world of 0-basing.

Not exactly something I would recommend ...

~~~
jzwinck
I would love to see that list. Have a link?

~~~
bsder
Here's one:
[https://www.reddit.com/r/lua/comments/60ynhr/lua_featuring_a...](https://www.reddit.com/r/lua/comments/60ynhr/lua_featuring_as_9_most_dreaded_language_on_stack/)

------
amai
If web browsers would start to interpret python directly, then maybe.
Otherwise I fear it will be Javascript.

~~~
PurpleRamen
Simple, just create webassembly-bytecode from python, and it will run in all
modern browsers. Or at least thats the goal.

~~~
amai
This doesn't seem to be so simple:
[https://stackoverflow.com/questions/44761748/compiling-
pytho...](https://stackoverflow.com/questions/44761748/compiling-python-to-
webassembly)

But some people had success nevertheless:
[http://droettboom.com/blog/2018/04/04/python-in-the-
browser/](http://droettboom.com/blog/2018/04/04/python-in-the-browser/)

------
gorbot
Nope. Maybe it’s the future of getting into programming, or scripting, but not
programming as a whole.

At least not if I have anything to say about it! Lol

------
jcahill84
No.

~~~
lupinglade
This. Swift is the language of the future.

