1 thought on “Lint request: Do not use optional new/const

  1. When it went to implementation, it became clear that there were serious concerns around how to make this work as specified with modular or platform independent compilation. As specified, you have to do constant evaluation before you can insert new and const, which means that in some important scenarios you can’t insert new and const until essentially link time. We did some quick exploration of alternatives (e.g. https://dart-review.googlesource.com/c/sdk/+/50080) but none of the options that were short term feasible were entirely satisfactory. Given our extremely short time horizon for landing a change, we felt that changing the spec was a large implementation risk, and had a large risk of us specifying a bad feature.

    I think it unlikely that we will ship the feature as originally specified in the future, but we may consider looking for an alternative way to get similar functionality at some point.

Comments are closed.