3 ms·
It seems that many imperative languages make have different types of assignments. C# also treats structs and classes differently with respect to assignment. Thi
by fjfaase 2y ago
It seems that many imperative languages make have different types of assignments. C# also treats structs and classes differently with respect to
assignment. This not always very transparent differences can lead to some of the nastiest bugs, especially in languages where you cannot easily see that two values 'point' to the same 'object' or are two 'objects' with the same value.
I wonder if it is possible to create a high-level imperative language that makes a clear difference between variables holding a value (possibly very complex with many different components, like lists, sets, trees, maps, and references) and cursors that point to a part of a value in a variable. Such cursors would typically always belong to a value in a variable and can be used to query and also modify the value.
- kaashif 2y agoAren't you talking about references or pointers? C++ and Rust have those - are these disqualified for not being high level?