With a bit of fiddeling you can use every kind of bracket to basically make function calls in c++
Here are the links to the snippets, all compile and run
Rust: https://godbolt.org/z/bM3d7bG14
With a bit of fiddeling you can use every kind of bracket to basically make function calls in c++
Here are the links to the snippets, all compile and run
Rust: https://godbolt.org/z/bM3d7bG14
When I was an intern, I was tasked with writing a file converter for 3D geometry files. There was an official cpp library to read the source files, so I was using that to read the data, restructure and transform it as needed, then write it to the output file format. Near the end, I was having a problem where I was SURE that my math was correct for the transform coordinates, but the resulting file would load in the viewer with all the correct looking pieces but all in the wrong locations. The senior guy there helped me debug it since I wasn’t super familiar with cpp at the time, and we found that the library I was using had overloaded the multiply (*) operator specifically for the objects I was using it on, and it was actually multiplying and saving the result directly to the first variable used in the multiplication. I assume it was done for memory efficiency or something, but I had no idea it would behave that way, so I was accidentally changing the values of variables I didn’t intend to.
Example: I was doing something a = b * c, which caused the value of b to be changed (to b * c). Which screwed things up when I needed the original value of b later.
This is the type of shit that haunts me. Imagine overloading “>>” for piping and hiding threading behind that. The idea was to create an async pipe, but nowhere are you aware of async or threading or whatever was chosen. You look at the code and think “of it’s like piping to stdout” or whatever, only to find out that the method immediately returns.
Tracking down what the hell is happening with code that has such hidden side effects is a nightmare.
Are you still in the C++ world?
That is WILD lol. No, after that, I did a bunch of backend server apps for a few years mostly in C#, and then I got put onto some web app stuff after that. For better or worse. I do enjoy it and appreciate the abstraction, and I have found that I do love frontend dev a lot, but I do sometimes miss the lower level languages haha.
I talked to a frontender recently who said they had less pleasure writing frontend, because AI could make it look as good as they wanted in a fraction of the time. Has AI changed anything for you?
I was “encouraged” to use AI at work for frontend and while it output functional stuff, lofting the hood om the how, terrified me. 😅