[cfe-dev] [ clang::Optional ] History Digging
David Blaikie via cfe-dev
cfe-dev at lists.llvm.org
Tue Jul 10 12:17:35 PDT 2018
Hi there,
Source control has most of the history - and in this particular case, it's
so far back in the earlier days of LLVM/Clang (Optional was originally
committed to Clang without any pre-commit review that I can see - in r78342
(git hash d4e5a606c9c64e24c05e5f4610796087e911fb9c)).
It looks like the original version didn't have any particular support for
references, though it probably would've worked in that initial simple
version. Since then no one's attempted to add support for references and
additional complexity of other features (construction from rvalue
references, etc) without concern for references has broken any incidental
reference support it may've had.
So I don't think it was some explicit choice not to support it - but a lack
of need & probably by the time folks (such as myself) were talking about
whether it should support references, there was enough open discussion
about the traedoffs/complexities of supporting them (thanks to the
committee discussions, etc) that there was probably at least a little
hesitance - likely enough to err on the side of "let's just keep doing
things the way we have and use raw pointers for 'optional rebindable
references'".
On Mon, Jul 9, 2018 at 3:49 PM ThePhD via cfe-dev <cfe-dev at lists.llvm.org>
wrote:
> Dear Clang Developers,
>
> I am trying to do a little bit of history diving. Back in 2010
> clang::Optional was moved to llvm::Optional, and has since then maintained
> its current interface with minor fixes / changes here and there.
>
> I was interested in finding out the initial motivation for
> clang::Optional, and what features it wanted to support. In particular,
> clang::Optional doesn't feature support for references, and a few other
> minor things that differ from the dominating optional implementation around
> the time of its transition and inception: boost::optional. This is one of
> the only optionals of its time that publicly made its own design decision,
> before "because the proposal / standard told me so" was a valid reason for
> doing so.
>
> Does anyone know if clang::Optional's design was discussed at all? Or
> if there are any archives for said discussion? This is a bit of an
> archaeology question, but I was hoping I could get answers nonetheless!
>
> Sincerely,
> ThePhD
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180710/d9803ea2/attachment.html>
More information about the cfe-dev
mailing list