14
submitted 2 months ago* (last edited 1 month ago) by bterwijn@programming.dev to c/python@programming.dev

An exercise to help build the right mental model for Python data. The “Solution” link uses memory_graph to visualize execution and reveals what’s actually happening:

you are viewing a single comment's thread
view the rest of the comments
[-] solrize@lemmy.ml -3 points 2 months ago

Preferred solution: learnyouahaskell.com . For immutable data!

[-] bterwijn@programming.dev 1 points 1 month ago

Different languages make different choices. The disadvantage of Haskell is that if you want to change one value in a collection of a million values that it either makes a full copy or tries to optimize by sharing values behind the scene, both resulting in significant overhead. Most people already understand that pure functional programming languages don't deliver except in very specific circumstances: Haskell TIOBE rating 0.32%, https://www.tiobe.com/tiobe-index/

this post was submitted on 14 Nov 2025
14 points (76.9% liked)

Python

7662 readers
23 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

📅 Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

🐍 Python project:
💓 Python Community:
✨ Python Ecosystem:
🌌 Fediverse
Communities
Projects
Feeds

founded 2 years ago
MODERATORS