←back to thread

122 points phsilva | 8 comments | | HN request time: 0.001s | source | bottom
Show context
thunkingdeep ◴[] No.43110710[source]
This does NOT mean Python will get Tail Call Optimization, as Guido cannot be shown The Light, and has decided.
replies(4): >>43110815 #>>43110832 #>>43111490 #>>43112657 #
rpcope1 ◴[] No.43110815[source]
That's probably one of the more frustrating things about Python. Each release it gets all sorts of questionable new syntax (including the very strange pattern matching "feature" that kind of sucks compared to something like Erlang or Scala), but we never get real useful quality of life improvements for basic functional programming like TCO or multi line lambdas
replies(4): >>43110836 #>>43110873 #>>43111245 #>>43111956 #
throwaway81523 ◴[] No.43110873[source]
Python has always been unashamedly imperative, with some functional features entering by slipping through the cracks. The pattern matching thing seemed ok to me when I tried it, but I haven't used it except briefly, since I'm still mostly on Python 3.9. Interestingly, Python has been losing users to Rust. I don't entirely understand that, other than everyone saying how Rust's tooling is so much better.
replies(3): >>43111772 #>>43112685 #>>43113691 #
flakes ◴[] No.43111772[source]
> Python has been losing users to Rust. I don't entirely understand that, other than everyone saying how Rust's tooling is so much better.

Not to rust, but to Go and C++ for myself. The biggest motivating factor is deployment ease. It is so difficult to offer a nice client install process when large virtual environments are involved. Static executables solve so many painpoints for me in this arena. Rust would probably shine here as well.

If its for some internal bespoke process, I do enjoy using Python. For tooling shipped to client environments, I now tend to steer clear of it.

replies(2): >>43112485 #>>43112650 #
1. pjmlp ◴[] No.43112650[source]
As someone that always kept a foot on C++ land, dispite mostly working on managed languages, I would that by C++17 (moreso now in C++23), dispite all its quirks and warts, C++ has become good enough that I can write Python like code with it.

Maybe it is only a thing to those of us already damaged with C++, and with enough years experience using it, but there are still plenty of such folks around to matter, specially to GPU vendors, and compiler writers.

replies(1): >>43113864 #
2. cempaka ◴[] No.43113864[source]
Are there any books or curricula you'd recommend to someone starting out, who wants to learn a more modern style? My main worry is just that everything is going to be geared to C++11 (or worse, 98).
replies(3): >>43114206 #>>43119348 #>>43121530 #
3. pjmlp ◴[] No.43114206[source]
Yes, from Bjarne Stroustroup himself,

A Tour of C++, preferably the 2nd edition

Programming -- Principles and Practice Using C++, preferably the 3rd edition

replies(2): >>43114750 #>>43115700 #
4. cempaka ◴[] No.43114750{3}[source]
Thanks!
5. mversiotech ◴[] No.43115700{3}[source]
The latest edition of "A Tour of C++" is the 3rd one, from 2022. Is there any specific reason why you would recommend the 2nd edition (from 2018) over that one?
replies(1): >>43118335 #
6. pjmlp ◴[] No.43118335{4}[source]
I wasn't aware there is already a 3rd one.
7. svilen_dobrev ◴[] No.43119348[source]
kind-a summary: 21st century c++ (still by Bjarne Stroustrup)

https://news.ycombinator.com/item?id=42946321

8. throwaway81523 ◴[] No.43121530[source]
I liked "Effective Modern C++" although it is somewhat out of date by now. Stroustrup's recent article "21st century C++" https://cacm.acm.org/blogcacm/21st-century-c/ gives an overview (but not details) of more recent changes. There are also the C++ core guidelines though maybe those are also out of date? https://github.com/isocpp/CppCoreGuidelines

I've been looking at Rust and it's a big improvement over C, but it still strikes me as a work in progress, and its attitude is less paranoid than that of Ada. I'd at least like to see options to crank up the paranoia level. Maybe Ada itself will keep adapting too. Ada is clunky, but it is way more mature than Rust.