Ancestors

Toot

Written by Mark T. Tomczak on 2025-01-31 at 15:51

So there's this aspect of programming languages I've noticed (and is what irritates me the most about using them), but I don't have a name for it. I'm wondering if anyone has studied it formally.

It's easiest to give a concrete example rather than try to generalize it. In Python, named arguments can be passed directly(in="the", function="arguments", like="this"). But you can also pass them as a dictionary: directly(**args).

When you want to flip between those two representations, it's a little non-trivial because the representation for function arguments and for a literal dictionary are pretty distant from each other. Here's the steps:

I find that, in general, some languages are more susceptible to this phenomenon and some less. Python and JavaScript are mostly pretty good most of the time. LISP is okay (having to move right parens around to make all the scopes work is irritating; there are very good IDE accelerators for it, but I'm considering this issue at the language-syntax level, not the language-with-tooling level). I haven't used enough Rust to know, but I bet having to update lifetime constraints is a chore. C++ is easily the worst offender I've used (oh, you want to templatize that function? It looks entirely different now, and you'll be making changes across the .h and .cc file. Are you sure you wouldn't rather embrace the life of a humble dairy farmer?)

Is there a term for this?

[#]programminglanguages #Python #cplusplus

=> More informations about this toot | More toots from mark@mastodon.fixermark.com

Descendants

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113923766238469918
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
238.322327 milliseconds
Gemini-to-HTML Time
1.762338 milliseconds

This content has been proxied by September (3851b).