[Boost][Proposal] library for enhanced switch syntax. Request for Comments #2

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Boost][Proposal] library for enhanced switch syntax. Request for Comments #2

Boost - Dev mailing list
Hi All,

First attempt kind of failed due to alignment:(
So this is another one)

So I wrote a library eswitch which provides enhanced functionality for C++
switch.
Please take a look and leave your comments.

Motivation:
To overcome native switch limitations:
1) one parameter per switch
2) the parameter restricted to only integral types( int, char, enum ... )

Whereas "eswitch" supports any number of parameters and almost without
restriction on their type, as long as the type is comparable( i.e. has
operator== ).

Why it is important?
Because people want to overcome current switch limitation either by
implementing their own solution, non-standard extension or even trying to
standardize it.
Making proposed eswitch functionality part of the Boost-Library will
provide millions of developers useful, universal and agile functionality in
order to finally fulfill their needs.

Full proposal here:
https://github.com/rabdumalikov/proposals/blob/master/eswitch_boost_proposal.pdf


Repository: https://github.com/rabdumalikov/eswitch_v4

Best Regards
Rustam Abdumalikov

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: [Boost][Proposal] library for enhanced switch syntax. Request for Comments #2

Boost - Dev mailing list
On 11/8/2019 5:05 PM, рустам абдумаликов via Boost wrote:

> Hi All,
>
> First attempt kind of failed due to alignment:(
> So this is another one)
>
> So I wrote a library eswitch which provides enhanced functionality for C++
> switch.
> Please take a look and leave your comments.
>
> Motivation:
> To overcome native switch limitations:
> 1) one parameter per switch
> 2) the parameter restricted to only integral types( int, char, enum ... )
>
> Whereas "eswitch" supports any number of parameters and almost without
> restriction on their type, as long as the type is comparable( i.e. has
> operator== ).
>
> Why it is important?
> Because people want to overcome current switch limitation either by
> implementing their own solution, non-standard extension or even trying to
> standardize it.
> Making proposed eswitch functionality part of the Boost-Library will
> provide millions of developers useful, universal and agile functionality in
> order to finally fulfill their needs.
>
> Full proposal here:
> https://github.com/rabdumalikov/proposals/blob/master/eswitch_boost_proposal.pdf
>
>
> Repository: https://github.com/rabdumalikov/eswitch_v4

I have not looked at your docs or code but I think the idea of a
multi-parameter, multi-type switch construct would be useful to many
programmers.

>
> Best Regards
> Rustam Abdumalikov


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost