--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CA%2BapAgE-7XExJeivULBWhaehSCm%2BDshx3ag6q0NpJs5epC0D%3DA%40mail.gmail.com.
It seems great to me to reduce boilerplate code.One thing that may be worth discussing: In the example, "FOO" doesn't need to be defined anywhere, right? If we have a typo, say, "COMPONENT(FO0)". I imagine it probably will fail in some interesting way that is not very easy to figure out.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CABxY52AhKjD0wfPChfqX%3D%3Dr4PxKiHFgd%3DCmVj-fHfxJX9yRB6w%40mail.gmail.com.
On Fri, Jan 19, 2018 at 11:18 AM Yuzhu Shen <yzs...@chromium.org> wrote:It seems great to me to reduce boilerplate code.One thing that may be worth discussing: In the example, "FOO" doesn't need to be defined anywhere, right? If we have a typo, say, "COMPONENT(FO0)". I imagine it probably will fail in some interesting way that is not very easy to figure out.Hopefully, people aren't adding these /too/ often?
Maybe you could teach GN's component() fuction to automatically define IS_FOO_IMPL for component("foo") even ...
On Fri, Jan 19, 2018 at 11:31 AM, Yuzhu Shen <yzs...@chromium.org> wrote:On Fri, Jan 19, 2018 at 11:24 AM, Daniel Cheng <dch...@chromium.org> wrote:On Fri, Jan 19, 2018 at 11:18 AM Yuzhu Shen <yzs...@chromium.org> wrote:It seems great to me to reduce boilerplate code.One thing that may be worth discussing: In the example, "FOO" doesn't need to be defined anywhere, right? If we have a typo, say, "COMPONENT(FO0)". I imagine it probably will fail in some interesting way that is not very easy to figure out.Hopefully, people aren't adding these /too/ often?COMPONENT(FOO) will need to be repeated for every exported definition. So it won't be surprising if there are some typos, I guess?
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CABxY52B9879OTGmhXzitaXz1qFAWrPm5Yt%3DN%3Dsm%3DY_AxpNzwtg%40mail.gmail.com.
Oh I misread the proposal. I thought that this would be a helper to expand out the boilerplate in the *_export.h file, and that everything else would still use FOO_EXPORT. Would something like that be viable?
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CA%2BapAgETkNNLQM4-BQcS2mNXRE2E1m8feo4T_58RWp2zMA1Qng%40mail.gmail.com.