You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Michael Park <mp...@apache.org> on 2015/12/13 19:46:41 UTC

`F()` vs `F(void)`

Hello,

In the C++ world, the *void* parameter is considered to be only there for C
compatibility reasons.

We do a good job of not using *void *parameters in function declarations,
e.g., *void F();*. On the other hand, we're *not* so good doing so for
function types, e.g., *std::function<void(void)>*.

I would like to see the codebase converge to *not* use *void* as a
parameter type, and would like feedback if anyone holds strong opposing
opinions.

Thanks,

MPark.

Re: `F()` vs `F(void)`

Posted by tommy xiao <xi...@gmail.com>.
+1

2015-12-14 5:08 GMT+08:00 Benjamin Hindman <be...@eecs.berkeley.edu>:

> +1!
>
> On Sun, Dec 13, 2015 at 10:46 AM, Michael Park <mp...@apache.org> wrote:
>
> > Hello,
> >
> > In the C++ world, the *void* parameter is considered to be only there
> for C
> > compatibility reasons.
> >
> > We do a good job of not using *void *parameters in function declarations,
> > e.g., *void F();*. On the other hand, we're *not* so good doing so for
> > function types, e.g., *std::function<void(void)>*.
> >
> > I would like to see the codebase converge to *not* use *void* as a
> > parameter type, and would like feedback if anyone holds strong opposing
> > opinions.
> >
> > Thanks,
> >
> > MPark.
> >
>



-- 
Deshi Xiao
Twitter: xds2000
E-mail: xiaods(AT)gmail.com

Re: `F()` vs `F(void)`

Posted by Benjamin Hindman <be...@eecs.berkeley.edu>.
+1!

On Sun, Dec 13, 2015 at 10:46 AM, Michael Park <mp...@apache.org> wrote:

> Hello,
>
> In the C++ world, the *void* parameter is considered to be only there for C
> compatibility reasons.
>
> We do a good job of not using *void *parameters in function declarations,
> e.g., *void F();*. On the other hand, we're *not* so good doing so for
> function types, e.g., *std::function<void(void)>*.
>
> I would like to see the codebase converge to *not* use *void* as a
> parameter type, and would like feedback if anyone holds strong opposing
> opinions.
>
> Thanks,
>
> MPark.
>

Re: `F()` vs `F(void)`

Posted by Bernd Mathiske <be...@mesosphere.io>.
High five!

> On Jan 21, 2016, at 12:40 AM, Michael Park <mc...@gmail.com> wrote:
> 
> `void` parameters are no longer with us.
> 
> https://github.com/apache/mesos/commit/93a5708294d6d66a5e1350a0bb1c8fe87605ee1d
> https://github.com/apache/mesos/commit/05f9fb2fa66968f37418d28fc8cebd0770a54dca
> https://github.com/apache/mesos/commit/4d4d7166414f0ebd8d5e40df34070446098a3c91
> 
> On Mon, Dec 14, 2015 at 5:36 AM Alexander Rojas <al...@mesosphere.io>
> wrote:
> 
>> +1
>> 
>>> On 13 Dec 2015, at 19:46, Michael Park <mp...@apache.org> wrote:
>>> 
>>> Hello,
>>> 
>>> In the C++ world, the *void* parameter is considered to be only there
>> for C
>>> compatibility reasons.
>>> 
>>> We do a good job of not using *void *parameters in function declarations,
>>> e.g., *void F();*. On the other hand, we're *not* so good doing so for
>>> function types, e.g., *std::function<void(void)>*.
>>> 
>>> I would like to see the codebase converge to *not* use *void* as a
>>> parameter type, and would like feedback if anyone holds strong opposing
>>> opinions.
>>> 
>>> Thanks,
>>> 
>>> MPark.
>> 
>> 


Re: `F()` vs `F(void)`

Posted by Michael Park <mc...@gmail.com>.
`void` parameters are no longer with us.

https://github.com/apache/mesos/commit/93a5708294d6d66a5e1350a0bb1c8fe87605ee1d
https://github.com/apache/mesos/commit/05f9fb2fa66968f37418d28fc8cebd0770a54dca
https://github.com/apache/mesos/commit/4d4d7166414f0ebd8d5e40df34070446098a3c91

On Mon, Dec 14, 2015 at 5:36 AM Alexander Rojas <al...@mesosphere.io>
wrote:

> +1
>
> > On 13 Dec 2015, at 19:46, Michael Park <mp...@apache.org> wrote:
> >
> > Hello,
> >
> > In the C++ world, the *void* parameter is considered to be only there
> for C
> > compatibility reasons.
> >
> > We do a good job of not using *void *parameters in function declarations,
> > e.g., *void F();*. On the other hand, we're *not* so good doing so for
> > function types, e.g., *std::function<void(void)>*.
> >
> > I would like to see the codebase converge to *not* use *void* as a
> > parameter type, and would like feedback if anyone holds strong opposing
> > opinions.
> >
> > Thanks,
> >
> > MPark.
>
>

Re: `F()` vs `F(void)`

Posted by Alexander Rojas <al...@mesosphere.io>.
+1

> On 13 Dec 2015, at 19:46, Michael Park <mp...@apache.org> wrote:
> 
> Hello,
> 
> In the C++ world, the *void* parameter is considered to be only there for C
> compatibility reasons.
> 
> We do a good job of not using *void *parameters in function declarations,
> e.g., *void F();*. On the other hand, we're *not* so good doing so for
> function types, e.g., *std::function<void(void)>*.
> 
> I would like to see the codebase converge to *not* use *void* as a
> parameter type, and would like feedback if anyone holds strong opposing
> opinions.
> 
> Thanks,
> 
> MPark.


Re: `F()` vs `F(void)`

Posted by Joris Van Remoortere <jo...@mesosphere.io>.
+1

—
*Joris Van Remoortere*
Mesosphere

On Sun, Dec 13, 2015 at 11:39 AM, Benjamin Mahler <benjamin.mahler@gmail.com
> wrote:

> std::function<void(void)> becomes std::function<void()>?
>
> +1
>
> On Sun, Dec 13, 2015 at 10:55 AM, Jie Yu <yu...@gmail.com> wrote:
>
> > +1
> >
> > On Sun, Dec 13, 2015 at 10:46 AM, Michael Park <mp...@apache.org> wrote:
> >
> > > Hello,
> > >
> > > In the C++ world, the *void* parameter is considered to be only there
> > for C
> > > compatibility reasons.
> > >
> > > We do a good job of not using *void *parameters in function
> declarations,
> > > e.g., *void F();*. On the other hand, we're *not* so good doing so for
> > > function types, e.g., *std::function<void(void)>*.
> > >
> > > I would like to see the codebase converge to *not* use *void* as a
> > > parameter type, and would like feedback if anyone holds strong opposing
> > > opinions.
> > >
> > > Thanks,
> > >
> > > MPark.
> > >
> >
>

Re: `F()` vs `F(void)`

Posted by Benjamin Mahler <be...@gmail.com>.
std::function<void(void)> becomes std::function<void()>?

+1

On Sun, Dec 13, 2015 at 10:55 AM, Jie Yu <yu...@gmail.com> wrote:

> +1
>
> On Sun, Dec 13, 2015 at 10:46 AM, Michael Park <mp...@apache.org> wrote:
>
> > Hello,
> >
> > In the C++ world, the *void* parameter is considered to be only there
> for C
> > compatibility reasons.
> >
> > We do a good job of not using *void *parameters in function declarations,
> > e.g., *void F();*. On the other hand, we're *not* so good doing so for
> > function types, e.g., *std::function<void(void)>*.
> >
> > I would like to see the codebase converge to *not* use *void* as a
> > parameter type, and would like feedback if anyone holds strong opposing
> > opinions.
> >
> > Thanks,
> >
> > MPark.
> >
>

Re: `F()` vs `F(void)`

Posted by Jie Yu <yu...@gmail.com>.
+1

On Sun, Dec 13, 2015 at 10:46 AM, Michael Park <mp...@apache.org> wrote:

> Hello,
>
> In the C++ world, the *void* parameter is considered to be only there for C
> compatibility reasons.
>
> We do a good job of not using *void *parameters in function declarations,
> e.g., *void F();*. On the other hand, we're *not* so good doing so for
> function types, e.g., *std::function<void(void)>*.
>
> I would like to see the codebase converge to *not* use *void* as a
> parameter type, and would like feedback if anyone holds strong opposing
> opinions.
>
> Thanks,
>
> MPark.
>