this post was submitted on 08 Jun 2026
486 points (94.8% liked)

Programmer Humor

31814 readers
476 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 3 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] Technus@lemmy.zip 7 points 6 days ago (1 children)

Real talk: is there any practical use-case for T*** of any pointee type?

[–] palordrolap@fedia.io 20 points 6 days ago (3 children)

Dynamically allocated multidimensional arrays.

[–] Technus@lemmy.zip 12 points 6 days ago (1 children)

Ah right, so that would be a 3D array.

  • T* is a single row of T
  • T** is a list of rows
  • T*** is a list of "layers" in the third dimension

This would be incredibly hazardous to pass around as a bare pointer with no context, though. I'd expect to see this in a struct that, at minimum, also includes fields for the size of each dimension.

[–] BartyDeCanter@piefed.social 8 points 6 days ago

This ~~Sparta~~ C. We live for danger.

[–] Auth@lemmy.world 7 points 6 days ago

Tesseract Array

[–] MonkderVierte@lemmy.zip 1 points 6 days ago (1 children)
[–] palordrolap@fedia.io 3 points 5 days ago (1 children)

In the C programming language. Or do you mean which C project specifically? Because as Technus surmises in their response, it's usually a better idea to set up aliases (typedefs or heck, even #defines) so that you're offloading some of the mental strain keeping track of the layers, and that's likely to be what happens in production code.

But the underlying data type is still T***.