On Wed, Nov 13, 2013 at 1:06 PM, Bertrand Delacretaz
<[email protected]> wrote:
> Hi Robert,
>
> On Tue, Nov 12, 2013 at 5:38 PM, Robert Munteanu <[email protected]> wrote:
>> ...1. I am typically wary of using Strings and am thinking that Enums
>> would be a nice fit for feature flags...
>
> I see your point, what's the reason? Performance? Risk of typos?
>
>> ...how about having a FeatureFlag marker interface and them enums can
>> implement it?...
>
> The problem (and this isn't visible in my too contrived examples for
> now) is that the feature flag names will mostly be defined by
> configurations IMO.
>
> For example, if you have a feature flag set by a cookie with a
> specific value, the config would be:
>
>   cookie name=foo
>   value=bar
>   feature flag name=foobar.cookie
>
> And another instance of the same service would have different config
> values and needs a unique feature flag ID.
>
> Do you see a way of generating enums with unique and discoverable
> values for such a case?


Hm, no. Given this use cases I think that Strings are fine.

Robert

-- 
Sent from my (old) computer

Reply via email to