You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pirk.apache.org by Walter Ray-Dulany <ra...@gmail.com> on 2016/07/22 05:37:31 UTC

Use enums in switch added in pirk pull request 16 ?

A minor suggestion: I think we should migrate the switch statement added in
pull request 16 to switch on an enum instead of a string. The switch is
over the list of the primitive java data types, so we'll know the list at
compile time, making it a good enum, candidate, and we would get
compile-time checking with the enum we can't get with Strings.

Thoughts?

Re: Use enums in switch added in pirk pull request 16 ?

Posted by Jacob Wilder <ja...@gmail.com>.
I'm on it.

—
Jacob WIlder

On Fri, Jul 22, 2016 at 2:06 PM, Suneel Marthi <su...@gmail.com>
wrote:

> Started working on this and seems like the i will have to modify schema
> code too, its risky to attempt this in my limited time - I'll look at it
> next week, if others would like to work on this please go ahead.
>
>
>
> On Fri, Jul 22, 2016 at 1:55 AM, Suneel Marthi <su...@gmail.com>
> wrote:
>
> > +1 will make the change tomorrow. Thanks for feedback.
> >
> > On Fri, Jul 22, 2016 at 1:37 AM, Walter Ray-Dulany <ra...@gmail.com>
> > wrote:
> >
> >> A minor suggestion: I think we should migrate the switch statement added
> >> in
> >> pull request 16 to switch on an enum instead of a string. The switch is
> >> over the list of the primitive java data types, so we'll know the list
> at
> >> compile time, making it a good enum, candidate, and we would get
> >> compile-time checking with the enum we can't get with Strings.
> >>
> >> Thoughts?
> >>
> >
> >
>

Re: Use enums in switch added in pirk pull request 16 ?

Posted by Suneel Marthi <su...@gmail.com>.
Started working on this and seems like the i will have to modify schema
code too, its risky to attempt this in my limited time - I'll look at it
next week, if others would like to work on this please go ahead.



On Fri, Jul 22, 2016 at 1:55 AM, Suneel Marthi <su...@gmail.com>
wrote:

> +1 will make the change tomorrow. Thanks for feedback.
>
> On Fri, Jul 22, 2016 at 1:37 AM, Walter Ray-Dulany <ra...@gmail.com>
> wrote:
>
>> A minor suggestion: I think we should migrate the switch statement added
>> in
>> pull request 16 to switch on an enum instead of a string. The switch is
>> over the list of the primitive java data types, so we'll know the list at
>> compile time, making it a good enum, candidate, and we would get
>> compile-time checking with the enum we can't get with Strings.
>>
>> Thoughts?
>>
>
>

Re: Use enums in switch added in pirk pull request 16 ?

Posted by Suneel Marthi <su...@gmail.com>.
+1 will make the change tomorrow. Thanks for feedback.

On Fri, Jul 22, 2016 at 1:37 AM, Walter Ray-Dulany <ra...@gmail.com>
wrote:

> A minor suggestion: I think we should migrate the switch statement added in
> pull request 16 to switch on an enum instead of a string. The switch is
> over the list of the primitive java data types, so we'll know the list at
> compile time, making it a good enum, candidate, and we would get
> compile-time checking with the enum we can't get with Strings.
>
> Thoughts?
>