storm icon indicating copy to clipboard operation
storm copied to clipboard

std::optional vs boost::optional

Open sjunges opened this issue 2 years ago • 7 comments

did we agree which we use? I am slightly in favor of std.

sjunges avatar Sep 22 '22 17:09 sjunges

My vote is for std::optional as well.

tquatmann avatar Sep 23 '22 03:09 tquatmann

I am also in favour of using features from std whenever possible.

volkm avatar Sep 23 '22 07:09 volkm

As a follow-up, other constructs such as boost::any can possibly also be replaced.

volkm avatar Sep 23 '22 07:09 volkm

Agreed; I'm not sure, however, if we should should replace all the occurrences at once or do this slowly, whenever we work on a file? I prefer the latter, tbh.

tquatmann avatar Sep 23 '22 07:09 tquatmann

I personally would prefer the former. Then we have one dedicated commit which changes this behaviour, and we can also make sure that certain constructs are not occurring anymore. Otherwise, I could see that certain parts are never updated, because the file is never worked on. I see however, that the first option is more work at once and one has to be more careful not to break anything.

volkm avatar Sep 23 '22 07:09 volkm

Having done this a bit: one dedicated commit is definitively chaos. I think it is good to start getting particular parts of the code boost-optional free, that way, it feels rewarding, but also something that you can do in a few unproductive hours.

sjunges avatar Apr 21 '23 12:04 sjunges

Some related discussion here

volkm avatar May 22 '24 07:05 volkm