Re: [webkit-dev] Code Style: Opinion on returning void

2019-02-19 Thread Daniel Bates
On Feb 19, 2019, at 9:42 PM, Ryosuke Niwa  wrote:

On Tue, Feb 19, 2019 at 8:59 PM Daniel Bates  wrote:

> > On Feb 7, 2019, at 12:47 PM, Daniel Bates  wrote:
> >
> > Hi all,
> >
> > Something bothers me about code like:
> >
> > void f();
> > void g()
> > {
> > if (...)
> > return f();
> > return f();
> > }
> >
> > I prefer:
> >
> > void g()
> > {
> > if (...) {
> > f();
> > return
> > }
> > f();
> > }
> >
> Based on the responses it seems there is sufficient leaning to codify
> the latter style.
>

I don't think there is a sufficient consensus as far as I can tell. Geoff


I didn't get this from Geoff's remark. Geoff wrote:

***“return f()” when f returns void is a bit mind bending.***

Don't want to put words in Geoff's mouth. So, Geoff can you please
confirm: for the former style, for the latter style, no strong
opinion.


and Alex both expressed preferences for being able to return void,


I got this from Alex's message

and Saam pointed out that there is a lot of existing code which does this.


I did not get this. He wrote emphasis mine:

I've definitely done this in JSC. ***I don't think it's super
common***, but I've also seen code in JSC not written by me that also
does this.


Zalan also said he does this in his layout code.


I did not get this, quoting, emphasis mine:

I use this idiom too in the layout code. I guess I just prefer a more
compact code.
***(I don't feel too strongly about it though)***


By the way, you even acknowledged that "WebKit ... tend[s] to have a
separate return.". So, I inferred you were okay with it. But from this
email I am no longer sure what your position is. Please state it clearly.

- R. Niwa
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] Code Style: Opinion on returning void

2019-02-19 Thread Ryosuke Niwa
On Tue, Feb 19, 2019 at 8:59 PM Daniel Bates  wrote:

> > On Feb 7, 2019, at 12:47 PM, Daniel Bates  wrote:
> >
> > Hi all,
> >
> > Something bothers me about code like:
> >
> > void f();
> > void g()
> > {
> > if (...)
> > return f();
> > return f();
> > }
> >
> > I prefer:
> >
> > void g()
> > {
> > if (...) {
> > f();
> > return
> > }
> > f();
> > }
> >
> Based on the responses it seems there is sufficient leaning to codify
> the latter style.
>

I don't think there is a sufficient consensus as far as I can tell. Geoff
and Alex both expressed preferences for being able to return void, and Saam
pointed out that there is a lot of existing code which does this. Zalan
also said he does this in his layout code.

- R. Niwa
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] Code Style: Opinion on returning void

2019-02-19 Thread Daniel Bates
> On Feb 7, 2019, at 12:47 PM, Daniel Bates  wrote:
>
> Hi all,
>
> Something bothers me about code like:
>
> void f();
> void g()
> {
> if (...)
> return f();
> return f();
> }
>
> I prefer:
>
> void g()
> {
> if (...) {
> f();
> return
> }
> f();
> }
>
Based on the responses it seems there is sufficient leaning to codify
the latter style.

Patch posted  for
review of language and examples.

Summary of this thread is in that bug, too.

Dan


> Does it bother you? For the former? For the latter? Update our style guide?
>
> Opinions, please.
>
> Dan
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


[webkit-dev] Licensing terms for content from developer.apple.com

2019-02-19 Thread Adrian Perez de Castro
Hello WebKittens,

Lately we have been working on enabling the content extensions feature
in the GTK and WPE WebKit ports [1], and we would like to include in the
generated API documentation a reference of the JSON source format which
WebKit consumes.

There is one page [2] at “developer.apple.com” which already includes
a description, and I was wondering if it would be possible to copy some
part from it. What is the licensing situation for the contents in that
page? Would it be acceptable to copy the tables with the possible values
for the different objects, and some of the paragraphs, in our documentation?

Best regards,


-Adrián

---
[1] https://bugs.webkit.org/show_bug.cgi?id=167941
[2] 
https://developer.apple.com/documentation/safariservices/creating_a_content_blocker?language=objc


pgpLPIIk2tm4S.pgp
Description: PGP signature
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev