2 ms·
but less clear. Some of the newer languages do aways with -> completely but I think it just obscures the data structures. The one frequent annoyance that I ha
by jstimpfle 5y ago
but less clear.
Some of the newer languages do aways with -> completely but I think it just obscures the data structures.
The one frequent annoyance that I had with . vs -> is that for access local variables I need to use . and if I make that code into a function that takes the local variables as a pointer, I need to change the code into ->. In other words, I can't easily move the code through stages of solidification using simple copy & paste.
That's why I tend to declare my local variables using pointer literal syntax, e.g.
Foo *local_thing = &(Foo) { ... };
That way it gets easier to move the code out.