r/ProgrammingLanguages • • Sep 21 '26

Discussion What’s one thing you wish more programming languages had?

If you could add one feature, behavior, or design choice to a programming language, what would it be?

It can be anything: syntax, type-system features, memory management, compiler behavior, tooling, error handling, performance-related features, or something completely different.

I'm especially curious about things you’ve wanted while actually programming but rarely see languages implement well.

Please keep the ideas reasonably practical and something that could realistically be implemented in a programming language.

60 Upvotes

299 comments sorted by

View all comments

2

u/adityazero Sep 21 '26

Provenance of pointers, no popular programming languages have it. That is why I started writing Vx ( https://vxlang.org ). It is common to have heterogeneous system these days and there is no unified way to reason about pointers across topologies. a `float *` from cudaMalloc is the same as `float *` from malloc in C/C++. And that is a source of bug as well as missed optimizations.

2

u/UdPropheticCatgirl Sep 22 '26

would be cool if this idea generalized to all allocators, like something allocated on ArenaA does not have the same provenance as ArenaB, so you could so static analysis on that.

1

u/adityazero Sep 22 '26

It does generalize. A memory space in Vx is just a name: Memory PoolA { capacity: 1 MiB, managed: explicit } and now the space becomes part of the type, so Tensor<f32, [4,4], Memory::PoolA> and ...Memory::PoolB> are different types.

But it is possible that i'm missing something because a space is currently a global name tied to a device.

1

u/Axman6 Sep 22 '26

Potentially quite a risky name choice given the history of the VX nerve agent:  https://en.wikipedia.org/wiki/VX_(nerve_agent).

What would the provenance of pointers look like?

1

u/adityazero Sep 22 '26

For example, we can define a Tensor type with placement (Memory::SMEM)

```

let mut qs = Tensor<f32, [2], Memory::SMEM>::uninit(); // block-shared tile
for bq in 0..4 {
for qi in 0..2 { qs[qi] = q[bq * 2 + qi] * 2.0; }
}
```

https://vxlang.org/docs/heterogeneous.html has more documentation. Still pretty early stage compiler.