Live data from Hacker News

Is Python the Future of Programming?

m.slashdot.org

21–30 of 77 posts

Re: Is Python the Future of Programming?

#21
post #13

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.

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.

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.

Re: Is Python the Future of Programming?

#22

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.

I've been wanting to learn Rust for a long time, but Python is just so good at so many things that I find it hard to get started with Rust. The other day, I wanted to make a small server that would email you if your cron jobs didn't run[1] (using a checkin system), and I started to do it in Rust, but I found prototyping with it at my starter level so hard, that I thought "alright I can either do this in Python in three hours, or spend a week with Rust and probably quit half-way".

This is whether the project is for the web, desktop, microcontrollers, CLI, whatever. Python might not be perfect for any of these things, but it's great for all of them. I need to try to write a kernel or something.

[1]: This is the finished product, by the way: https://gitlab.com/stavros/caduceus

Re: Is Python the Future of Programming?

#23
post #16
post #8

Earlier quoted context omitted.

Access modifiers are something that I only ever find to get in the way. I've recently moved to Java from Python for work. The underscore convention in python works fine for hiding stuff from the general public namespace, but its still there if you want to explore how some code or module works. Java really annoys me because I can't access implementation details when I'm trying something out in an interactive shell or…

The point of access modifiers is to get in the way. They're ways of allowing developers of one part of the source to control what the path of least resistance is for the users of that code. If you expose everything, someone will write code that depends against it and make it harder for you to improve or change it in the future. Tossing in roadblocks helps guide users to the better long-term path. It doesn't really ma…

`foo._a` accessible outside `Foo` but it makes code look gross and means you're doing something wrong.

`foo.__a` accessible only inside `Foo`

I think it works.

Re: Is Python the Future of Programming?

#24
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.

Re: Is Python the Future of Programming?

#25
post #16
post #8

Earlier quoted context omitted.

Access modifiers are something that I only ever find to get in the way. I've recently moved to Java from Python for work. The underscore convention in python works fine for hiding stuff from the general public namespace, but its still there if you want to explore how some code or module works. Java really annoys me because I can't access implementation details when I'm trying something out in an interactive shell or…

The point of access modifiers is to get in the way. They're ways of allowing developers of one part of the source to control what the path of least resistance is for the users of that code. If you expose everything, someone will write code that depends against it and make it harder for you to improve or change it in the future. Tossing in roadblocks helps guide users to the better long-term path. It doesn't really ma…

If you are working with a large team, you need a statically typed language. Access modifiers are the least of your problems, the lack of refactoring support is a much bigger problem.

Re: Is Python the Future of Programming?

#26
post #8

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.

Access modifiers are something that I only ever find to get in the way. I've recently moved to Java from Python for work. The underscore convention in python works fine for hiding stuff from the general public namespace, but its still there if you want to explore how some code or module works. Java really annoys me because I can't access implementation details when I'm trying something out in an interactive shell or…

Personally, internal mutation is something you should avoid in general. Pretty hard to avoid in OO languages though.

Re: Is Python the Future of Programming?

#27

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.

> Lambda functions are really great in Python

Hah, if you had told anyone that five years ago they would have been very confused. "What are you talking about? Lambdas in Python are horribly neutered..."

Back to what you actually meant, I think that lambda functions will get simpler to use in every language, and I think JS will extend a lead there even though I prefer Python as a language.

I should get my "microservices built out of spreadsheets" project (https://6gu.nz) onto AWS Lambda to get in on the zeitgeist though, put a horse in the race. And then somehow get deep learning (and the blockchain...) in there to really cash in on the bandwagon trends.

Re: Is Python the Future of Programming?

#28
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.

Re: Is Python the Future of Programming?

#29
post #19
post #9

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.

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

I feel Lua has a lot of anti-patterns which makes transitioning to/from other languages difficult. Tables are unintuitive versus other data structures, structure syntax varies from other C-languages, and oddly it uses one-based indexing.

Lua is nice in that it's easy to embed into existing projects, and has an established userbase in game modding communities (Garry's Mod, Minecraft computer mods).

Re: Is Python the Future of Programming?

#30
post #17

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…

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.

Post reply on HN