impossible to assign a default value to a bool #13

Closed
robey opened this Issue May 5, 2012 · 3 comments

Comments

4 participants
@robey
Collaborator

robey commented May 5, 2012

It looks like thrift doesn't define any syntax for true/false as a default value, so convention is to use 0 and 1, which may make sense to C people, but is objectively idiotic.

Scrooge should support both true/false and 0/1 as default values for bools.

Example from David Helder:

const bool ECHO_FRAMED = 1;

@jjmmcc

This comment has been minimized.

Show comment Hide comment
@jjmmcc

jjmmcc May 5, 2012

Contributor

While it is idiotic that the thrift IDL doesn't define explicit boolean constants, it may be unwise for us to start defining a super-set of the thrift IDL that only works with scrooge.

Contributor

jjmmcc commented May 5, 2012

While it is idiotic that the thrift IDL doesn't define explicit boolean constants, it may be unwise for us to start defining a super-set of the thrift IDL that only works with scrooge.

@erikvanoosten

This comment has been minimized.

Show comment Hide comment
@erikvanoosten

erikvanoosten Mar 22, 2013

Contributor

I was debugging Scrooge for 2 hours till I found this out. I am preparing a patch that will at least warn you.

Contributor

erikvanoosten commented Mar 22, 2013

I was debugging Scrooge for 2 hours till I found this out. I am preparing a patch that will at least warn you.

erikvanoosten added a commit to marktplaats-external/scrooge that referenced this issue Mar 25, 2013

@mosesn

This comment has been minimized.

Show comment Hide comment
@mosesn

mosesn May 29, 2016

Contributor

Looks like this was improved here: e9d2508

Contributor

mosesn commented May 29, 2016

Looks like this was improved here: e9d2508

@mosesn mosesn closed this May 29, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment