--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAJ_xCimGpfAyn3%2BRdQ1B_0FecCYL48_aaCBM-PQijP2he6Oy3w%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CABg10jwwwGwquGT5-kog46R0NCVwgKa2_oM0uUwHSrgqLCm8Vw%40mail.gmail.com.
--
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAAHOzFDo1y5zJQumv6U5SzSV1HypX57YqRa9wMVbJN8J7-P8rQ%40mail.gmail.com.
PK
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAAHOzFDo1y5zJQumv6U5SzSV1HypX57YqRa9wMVbJN8J7-P8rQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CA%2BapAgG_HLOkDby3gwapBEF1Nv4UxKbyW-c2LdXY3KXWvfSyqA%40mail.gmail.com.
I believe some teams have been adding references that is contrary to the style guide, I came across https://chromium.googlesource.com/chromium/src/+/5c568461a49ea21a26597782deec31f3d8fa414a and crbug.com/874385 which promotes this.
I'm personally reluctant to remove non-const references. Historically, mutable references were introduced to wipe out unnecessary null checks from the codebase -- there were so many pointer arguments whose non-nullness was ambiguous and people just added null checks just "for sure", which added up and caused people's frustration (figuring out whether a specific pointer can be null was super stressful work).I'm opposed to reversing the gear, because: (1) mixing two conventions would make things worse, and (2) the "phantom null check" problem is still a real issue for us, and it's more desirable for us to ensure the non-nullness by syntax, rather than other unreliable methods like comments or runtime checks.[I would rather think mutable reference arguments should be allowed in Google C++ style for these reasons. They are part of standard C++, after all.]
Thank you,Victor
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAP_mGKqpQrAArudkKvmUNZmFQhR8NRW7vMSiLr1QM%2BKmM4VhJQ%40mail.gmail.com.
FWIW, there was an effort a while ago to rewrite *from* pointers *to* references, though I weakly opposed it on roughly these grounds. I do like style consistency, but I'm afraid that we'd just be undoing that work and then in a couple years we'd churn back. :/
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAP_mGKrnVSzd8nxh45x6%2Bh3OoFkMWScEeW44hyKaSL%2B8yn1EOA%40mail.gmail.com.
Somewhat tangential, but let's say we hypothetically decide not to use mutable reference arguments. There's a long-term plan to change a number of getters from this:class LocalFrame {public:LocalFrameClient* Client();Page* GetPage();LocalFrameView* View();Document* GetDocument();};to:class LocalFrame {public:// Callers need to ensure that LocalFrame is attached, either via// checking |IsAttached()| explicitly or via some other guaranteed// invariant, before using these getters.LocalFrameClient& Client();Page& GetPage();LocalFrameView& View();Document& GetDocument();};
I'm personally reluctant to remove non-const references. Historically, mutable references were introduced to wipe out unnecessary null checks from the codebase -- there were so many pointer arguments whose non-nullness was ambiguous and people just added null checks just "for sure", which added up and caused people's frustration (figuring out whether a specific pointer can be null was super stressful work).I'm opposed to reversing the gear, because: (1) mixing two conventions would make things worse, and (2) the "phantom null check" problem is still a real issue for us, and it's more desirable for us to ensure the non-nullness by syntax, rather than other unreliable methods like comments or runtime checks.
[I would rather think mutable reference arguments should be allowed in Google C++ style for these reasons. They are part of standard C++, after all.]--On Wed, Feb 13, 2019 at 5:01 PM Matt Falkenhagen <fal...@chromium.org> wrote:--The Blink C++ Style Guide has this rule: "Pointer arguments that can never be null should be passed as a reference, even if this results in a mutable reference argument."This diverges from Chromium and Google style, which prohibits mutable reference arguments. The last time this came up was this thread, which was several years ago before Chromium and Blink style starting converging. The styles have been converging since then, and there is ongoing work moving code from //content/renderer to //third_party/blink so I'd like to revisit this.As written, the exception sounds mandatory (you must use a reference). I propose either making the exception optional (permit using a reference) or removing the exception (you must use a pointer).What do people think?
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAJ_xCimGpfAyn3%2BRdQ1B_0FecCYL48_aaCBM-PQijP2he6Oy3w%40mail.gmail.com.
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFJcur9UgReGPBzj%2BC_x%3DaOrPrzejRZN412gKPB2m%3DqPUrd7Jg%40mail.gmail.com.
There are other ways to get the same level of documentation but that also give some real protection e.g. NotNull<T> as discussed in the previous thread.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAAHOzFABb%3DK-Df8HJHrDRLk__Ah6_O1y2X6aN625MCwWYhNWiA%40mail.gmail.com.
On Wed, 13 Feb 2019 at 19:34, Yuta Kitamura <yu...@chromium.org> wrote:I'm personally reluctant to remove non-const references. Historically, mutable references were introduced to wipe out unnecessary null checks from the codebase -- there were so many pointer arguments whose non-nullness was ambiguous and people just added null checks just "for sure", which added up and caused people's frustration (figuring out whether a specific pointer can be null was super stressful work).I'm opposed to reversing the gear, because: (1) mixing two conventions would make things worse, and (2) the "phantom null check" problem is still a real issue for us, and it's more desirable for us to ensure the non-nullness by syntax, rather than other unreliable methods like comments or runtime checks.It's great documentation and I really like that (vs not having it in google3), it definitely makes errors less likely but it's only documentation, it doesn't actually provide real protection. The following code compiles just finevoid bar(String& s) {LOG(INFO) << s;}void foo(String* s) {bar(*s);}and segfaults on foo(nullptr) and I have seen real crashes involving null references.
There are other ways to get the same level of documentation but that also give some real protection e.g. NotNull<T> as discussed in the previous thread. These are somewhat verbose but if we want to adopt something, as a project, we could abbreviate any of them, e.g. N<T>. To be clear, I have no opinion on the desirable way to achieve this, I just wanted to point out that it seems achievable and the verbosity argument can be countered somewhat.Each style guide gives a distinct benefit (documenting mutability vs documenting nullability) but they conflict on how they deliver that benefit by overloading the same feature. Both benefits are worth having, that's why the argument keeps coming up.
Personally, I'd rather have both benefits with some extra verbosity than pick one or the other,
template <typename T>
T& Mutable(T& t) { return t; }
// Usage:
void f(std::string& s);
std::string s;
f(Mutable(s));
On Thu, Feb 14, 2019 at 10:33 AM Fergal Daly <fer...@google.com> wrote:On Wed, 13 Feb 2019 at 19:34, Yuta Kitamura <yu...@chromium.org> wrote:I'm personally reluctant to remove non-const references. Historically, mutable references were introduced to wipe out unnecessary null checks from the codebase -- there were so many pointer arguments whose non-nullness was ambiguous and people just added null checks just "for sure", which added up and caused people's frustration (figuring out whether a specific pointer can be null was super stressful work).I'm opposed to reversing the gear, because: (1) mixing two conventions would make things worse, and (2) the "phantom null check" problem is still a real issue for us, and it's more desirable for us to ensure the non-nullness by syntax, rather than other unreliable methods like comments or runtime checks.It's great documentation and I really like that (vs not having it in google3), it definitely makes errors less likely but it's only documentation, it doesn't actually provide real protection. The following code compiles just finevoid bar(String& s) {LOG(INFO) << s;}void foo(String* s) {bar(*s);}and segfaults on foo(nullptr) and I have seen real crashes involving null references.The most important effect of mutable reference in function arguments is that it moves the responsibility to do null checks from the called function to the caller. A mutable reference argument lets the user of the function pause and think, "hey, is this pointer really non-null?", before putting an asterisk before it. And this effect not only happens in each function-caller pair, but also in the whole codebase; the non-nullness assertion propagates until it reaches a concrete value or a pointer that's properly null checked. I think this gave the great code health benefit from my experience when WebKit moved to mutable refs. We had a lot of bogus null checks, but also had a lot of nullptr crashes coming from the incorrect assumption that a pointer is non-null. Use of references made us more aware of the (non-)nullness of pointers.There are other ways to get the same level of documentation but that also give some real protection e.g. NotNull<T> as discussed in the previous thread. These are somewhat verbose but if we want to adopt something, as a project, we could abbreviate any of them, e.g. N<T>. To be clear, I have no opinion on the desirable way to achieve this, I just wanted to point out that it seems achievable and the verbosity argument can be countered somewhat.Each style guide gives a distinct benefit (documenting mutability vs documenting nullability) but they conflict on how they deliver that benefit by overloading the same feature. Both benefits are worth having, that's why the argument keeps coming up.As I said earlier, the mutable ref argument does something more than documentation; it makes the caller put an asterisk before a pointer, which is a sufficient warning sign to the author and reviewers. I think its code health benefit is very important.
Personally, I'd rather have both benefits with some extra verbosity than pick one or the other,I agree, but unfortunately it's hard to emulate a mutable reference due to the language constraints around references. I also feel that adding NonNull<T> is like recreating a poor man's reference and it doesn't sound very productive.In the first place, using a pointer as a mutating argument is a kind of an abuse of the language feature -- references are the C++ way of doing that (unlike C), and the pointers have a critical defect that gives you an unnecessary nullptr state. The badness of null as a language feature is discussed in many places as many of you know.Perhaps we could add a soft rule that we must always use a simple Mutable() wrapper like the following when we pass mutating arguments? It doesn't prevent accidental ref passing, though... (is this something a Clang plugin can check?)template <typename T>
T& Mutable(T& t) { return t; }
// Usage:
void f(std::string& s);
std::string s;
f(Mutable(s));
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAAozHLmR3ani0LQLEwuhsxOZaLprvgcr3qb6LjhWK18SxW1GeA%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAJ_xCinsjJHg9%3DL4gm1Rw6gOgCO_zsyc0Agmc6Gfx2ZNXpWmDA%40mail.gmail.com.
As someone who works on both sides of the Blink divide, I strongly object to this and other gratuitous deviations from Chromium style. Chromium is far larger than just Blink, and the rest of the project has managed to follow Google style without catastrophe. This territorial "not invented here" attitude is an impediment to the velocity of Chromium as a whole.Yes, it would be nice if we had a safe way to annotate non-null pointers, but mutable references are not it. If anything, they make promises that the compiler doesn't actually keep.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFJcur8jhut7BDQ2jFc09Cfy8KNF8%3DySjKyom9gCeChZyBhmBg%40mail.gmail.com.
On Thu, Feb 14, 2019 at 8:36 PM Adam Rice <ri...@chromium.org> wrote:As someone who works on both sides of the Blink divide, I strongly object to this and other gratuitous deviations from Chromium style. Chromium is far larger than just Blink, and the rest of the project has managed to follow Google style without catastrophe. This territorial "not invented here" attitude is an impediment to the velocity of Chromium as a whole.Yes, it would be nice if we had a safe way to annotate non-null pointers, but mutable references are not it. If anything, they make promises that the compiler doesn't actually keep.To reiterate my points: references are almost the ONLY sane way to annotate non-null pointers. They won't prevent nullptr crashes 100%, but they enforce correctness in the syntax and make incorrect dereference much more easily discoverable. I would say its code health benefit was very clear as someone who observed the migration in WebKit.On the other hand, using a pointer does not seem like the only way to annotate mutability (in my opinion it does more harm than good). I hope the community to seek the possibility to make the Google style better in a constructive manner, rather than shutting out an idea with "rules are rules"-like attitude.
Blink should be aiming to converge on Chromium style, not deviate further. If we can't reach agreement to remove the mutable references, we should at least permit Chromium style, in order to allow convergence to happen naturally.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFJcur8jhut7BDQ2jFc09Cfy8KNF8%3DySjKyom9gCeChZyBhmBg%40mail.gmail.com.
On Thu, Feb 14, 2019 at 10:38 PM Yuta Kitamura <yu...@chromium.org> wrote:On Thu, Feb 14, 2019 at 8:36 PM Adam Rice <ri...@chromium.org> wrote:As someone who works on both sides of the Blink divide, I strongly object to this and other gratuitous deviations from Chromium style. Chromium is far larger than just Blink, and the rest of the project has managed to follow Google style without catastrophe. This territorial "not invented here" attitude is an impediment to the velocity of Chromium as a whole.Yes, it would be nice if we had a safe way to annotate non-null pointers, but mutable references are not it. If anything, they make promises that the compiler doesn't actually keep.To reiterate my points: references are almost the ONLY sane way to annotate non-null pointers. They won't prevent nullptr crashes 100%, but they enforce correctness in the syntax and make incorrect dereference much more easily discoverable. I would say its code health benefit was very clear as someone who observed the migration in WebKit.On the other hand, using a pointer does not seem like the only way to annotate mutability (in my opinion it does more harm than good). I hope the community to seek the possibility to make the Google style better in a constructive manner, rather than shutting out an idea with "rules are rules"-like attitude.I haven't seen anyone arguing "rules are rules" though. Many would probably agree that divergence from the style guide can be justified when we have compelling arguments. In this case however it seems that many feel the guidance is correct as-is, for the concrete reason that hidden mutability is a noticeable detriment to readability. It's not just some hypothetical problem invented by the style guide maintainers.
What I keep coming back to is this: we're able to maintain suitable code quality and readability (including a general lack of redundant null checks) without mutable refs anywhere else in our very large tree, so what is unique about //third_party/blink that makes this more challenging there?
Follow-up thought: if we're really set on passing mutable refs, could we have a clang plugin enforce that all such values are wrapped in something like a MUT(x) macro we define? Like DoTheThing(x, y, MUT(z))? Not sure it's a feasible or good idea, just... an idea.
I generally wanted people to not refuse the mutable ref rules blindly without assessing its technical merits. Someone could have compared the technical merits of references and the importance of the coding style alignment and said the latter would be more important. However, I have not seen anyone who oppose to mutable refs assessing the technical merits of allowing references in detail.
What I keep coming back to is this: we're able to maintain suitable code quality and readability (including a general lack of redundant null checks) without mutable refs anywhere else in our very large tree, so what is unique about //third_party/blink that makes this more challenging there?As far as I see it comes from Blink's stronger reliance to heap (pointer-based) objects, including refcounted and garbage-collected (NB. GC didn't exist when WebKit migration happened) ones. We used pointers a lot and were fairly loose on how to use them.
PK
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAAHOzFDuP47mFEi-d5pS37uYQW0OExwetnaGARAE1OmMqZ_%3DTg%40mail.gmail.com.
On Fri, Feb 15, 2019 at 5:20 AM Peter Kasting <pkas...@chromium.org> wrote:On Fri, Feb 15, 2019 at 12:53 AM Yuta Kitamura <yu...@chromium.org> wrote:I generally wanted people to not refuse the mutable ref rules blindly without assessing its technical merits. Someone could have compared the technical merits of references and the importance of the coding style alignment and said the latter would be more important. However, I have not seen anyone who oppose to mutable refs assessing the technical merits of allowing references in detail.Well, I tried. It wasn't tremendously detailed, but it seemed like it was at least as detailed as other comments here. And I didn't feel like I was the only one. It seemed like the majority of the comments in this thread, on both sides, addressed the merits of the various practices, beyond simply "align with style guide X". Maybe I just skimmed the posts that weren't like that, though.Do you think this summary is fair?:Using non-const ref arguments is clearer than any alternative (arguably, including gsl::not_null<> and the like) about documenting at the declaration that a function's argument must not be null. It is the only choice that really adds enforcement of this condition (DCHECK is not meant to serve as runtime enforcement so much as documentation, and even runtime enforcement pales compared to compile-time). If you believe that ensuring pointers are non-null is the paramount concern, ref arguments clearly achieve it best.The cost of this is that ref arguments are indistinguishable from value arguments at a callsite, adding potential readability and correctness hazards to callers. Mitigating this requires cumbersome custom annotations (just as not_null<> would be cumbersome to fix the opposite problem). They are currently banned by the Google and Chromium style guides, so preserving them also incurs the costs of a fairly impactful style disagreement for anyone working across the boundaries.Chromium code is nearly consistent about not using non-const ref arguments to functions. Blink code is less consistent about always using them. Experienced coders in each group have tended to express a preference for their existing syntax, and at least one person supporting each style has claimed to feel like migrating from one style to the other was a win.FWIW, I don't see anything in the above as providing definitive support for one side in the eyes of a neutral third party.What I keep coming back to is this: we're able to maintain suitable code quality and readability (including a general lack of redundant null checks) without mutable refs anywhere else in our very large tree, so what is unique about //third_party/blink that makes this more challenging there?As far as I see it comes from Blink's stronger reliance to heap (pointer-based) objects, including refcounted and garbage-collected (NB. GC didn't exist when WebKit migration happened) ones. We used pointers a lot and were fairly loose on how to use them.Chromium seems to use primarily heap allocations too (at least where I work in UI -- everything in Views is pointer-based). Are you sure Blink is significantly different than Chromium code in this regard?
My impression is that blink has used nullchecks as defensive programming very extensively in the past. It's not uncommon to see something likeif (page && page->document && page->document->frame && page->document->frame->widget)
page->document->frame->widget->letsgo();And it's not easy to then untangle which of those are actually possible - sometimes none! The same thing still occurs on member variables, but that's a different topic. It's not that this doesn't happen in "Chromium" code, but it has seemed like much more of a pattern in blink, and trying to undo that by using references seems like it would have been a very effective way since it leverages the compiler in helping track down all callers to a given function.So if I had to guess what the big difference is, I'd say that Chromium has historically done better overall wrt the law of demeter.All this said, just yesterday I was reading a method in blink, and a variable was passed to a number of methods, and as innocent as their names sounded, I had to remember to go look at the impl of each method to figure out of the variable was going to get mutated in order to understand what I was reading in the original method. So I myself value the callsites being clear about mutation over the signature being clear about null, while still feeling *very strongly* about defensive branching like null checks and make every one of them be explained usually via comments. (But I am used to google/chromium style I guess too.)
On Sat, Feb 16, 2019 at 1:44 AM <dan...@chromium.org> wrote:On Fri, Feb 15, 2019 at 5:20 AM Peter Kasting <pkas...@chromium.org> wrote:On Fri, Feb 15, 2019 at 12:53 AM Yuta Kitamura <yu...@chromium.org> wrote:I generally wanted people to not refuse the mutable ref rules blindly without assessing its technical merits. Someone could have compared the technical merits of references and the importance of the coding style alignment and said the latter would be more important. However, I have not seen anyone who oppose to mutable refs assessing the technical merits of allowing references in detail.Well, I tried. It wasn't tremendously detailed, but it seemed like it was at least as detailed as other comments here. And I didn't feel like I was the only one. It seemed like the majority of the comments in this thread, on both sides, addressed the merits of the various practices, beyond simply "align with style guide X". Maybe I just skimmed the posts that weren't like that, though.Do you think this summary is fair?:Using non-const ref arguments is clearer than any alternative (arguably, including gsl::not_null<> and the like) about documenting at the declaration that a function's argument must not be null. It is the only choice that really adds enforcement of this condition (DCHECK is not meant to serve as runtime enforcement so much as documentation, and even runtime enforcement pales compared to compile-time). If you believe that ensuring pointers are non-null is the paramount concern, ref arguments clearly achieve it best.The cost of this is that ref arguments are indistinguishable from value arguments at a callsite, adding potential readability and correctness hazards to callers. Mitigating this requires cumbersome custom annotations (just as not_null<> would be cumbersome to fix the opposite problem). They are currently banned by the Google and Chromium style guides, so preserving them also incurs the costs of a fairly impactful style disagreement for anyone working across the boundaries.Chromium code is nearly consistent about not using non-const ref arguments to functions. Blink code is less consistent about always using them. Experienced coders in each group have tended to express a preference for their existing syntax, and at least one person supporting each style has claimed to feel like migrating from one style to the other was a win.FWIW, I don't see anything in the above as providing definitive support for one side in the eyes of a neutral third party.What I keep coming back to is this: we're able to maintain suitable code quality and readability (including a general lack of redundant null checks) without mutable refs anywhere else in our very large tree, so what is unique about //third_party/blink that makes this more challenging there?As far as I see it comes from Blink's stronger reliance to heap (pointer-based) objects, including refcounted and garbage-collected (NB. GC didn't exist when WebKit migration happened) ones. We used pointers a lot and were fairly loose on how to use them.Chromium seems to use primarily heap allocations too (at least where I work in UI -- everything in Views is pointer-based). Are you sure Blink is significantly different than Chromium code in this regard?This has been my experience in //content as well (mostly pointer-based).My impression is that blink has used nullchecks as defensive programming very extensively in the past. It's not uncommon to see something likeif (page && page->document && page->document->frame && page->document->frame->widget)
page->document->frame->widget->letsgo();And it's not easy to then untangle which of those are actually possible - sometimes none! The same thing still occurs on member variables, but that's a different topic. It's not that this doesn't happen in "Chromium" code, but it has seemed like much more of a pattern in blink, and trying to undo that by using references seems like it would have been a very effective way since it leverages the compiler in helping track down all callers to a given function.So if I had to guess what the big difference is, I'd say that Chromium has historically done better overall wrt the law of demeter.All this said, just yesterday I was reading a method in blink, and a variable was passed to a number of methods, and as innocent as their names sounded, I had to remember to go look at the impl of each method to figure out of the variable was going to get mutated in order to understand what I was reading in the original method. So I myself value the callsites being clear about mutation over the signature being clear about null, while still feeling *very strongly* about defensive branching like null checks and make every one of them be explained usually via comments. (But I am used to google/chromium style I guess too.)These are good points. I guess another factor is WebKit had a stronger bias toward “code should be self-documenting” so had fewer comments where null checks occurred and less documentation of preconditions.I’m curious why this discussion hasn’t come up before in the context of Onion Soup. Have people moving code from //content been re-styling the code? I tried looking through the last ~15 CLs with “Onion Soup” in their commit descriptions. Most CLs were style-neutral (const references and nullable pointers, conforming to both style guides). 3 CLs clearly added Chromium-style code (non-nullable pointers). A couple were unclear, and there were instances of Chromium-style code in the existing blink code. I didn’t see any CL that added mutable references. [notes]I don’t see indications that these are intended to be “temporary workarounds”; the code is still written this way well after the CLs landed. So it seems the rule is already being treated as optional.
--So what I’m seeing is:1. Existing code in //third_party/blink is far from consistent wrt to the style guide.2. Some people are moving code from //content to //third_party/blink and retaining Chromium-style (Onion Soup).3. Some people are adding new code to //third_party/blink and made the design decision to use Chromium-style (LayoutNG).4. Some people are converting Chromium-style code in //third_party/blink to Blink-style (https://crbug.com/874385).This seems suboptimal.I get that mutable references have been an effective way to counter the problem of phantom null checks in WebKit-derived code but this justification doesn’t seem to apply as strongly to code imported from Chromium or newly written code. I think aligning to the style of the larger project will be the better choice in the long run as more of the latter is added to //third_party/blink.Cheers,Dana--PK
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAAHOzFDuP47mFEi-d5pS37uYQW0OExwetnaGARAE1OmMqZ_%3DTg%40mail.gmail.com.
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAJ_xCi%3D3DwSTw1kYwz0sqLe2th11D4Ujd3A9ZrYQvfX78__7rA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAJfDkaFtWfg4-rkDgWmRiSJyj_UeP9hZddB-37cVLGqS9N8E7w%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CABg10jzHfQV84OoisWi%3DoWRULoEtcAa0nMMtD-BFeQZgOkV5Jg%40mail.gmail.com.
In the meantime, haraken@ can I send you a CL as follows to update the style guide to make the rule optional and link to this discussion thread?
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CABg10jxSNAnawzttKf5A2vpm%3DrL5-kKR3%3D57z0pTqGuH4w7Ozw%40mail.gmail.com.
Any developments here?Thank you,Victor
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAF3XrKrkje%3DcFEXYHGgnjePkQBeNMaQVeAGmnjAOMd4Z03Bi6w%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAF3XrKrkje%3DcFEXYHGgnjePkQBeNMaQVeAGmnjAOMd4Z03Bi6w%40mail.gmail.com.