[Bro-Dev] #754: Complete implementation of switch statement

Bro Tracker bro at tracker.bro-ids.org
Tue Jan 15 08:25:01 PST 2013


#754: Complete implementation of switch statement
----------------------------+------------------------
  Reporter:  seth           |      Owner:  robin
      Type:  Merge Request  |     Status:  reopened
  Priority:  Normal         |  Milestone:  Bro2.2
 Component:  Bro            |    Version:  git/master
Resolution:                 |   Keywords:  language
----------------------------+------------------------

Comment (by jsiwek):

 Replying to [comment:26 robin]:
 > Sorry to keep going here but now I have a problem with this: our syntax
 is pretty much exactly like C, and C does fall-through. Having the same
 syntax but no fall-through seems wrong to me, and actually I find *that*
 to be unsafe in the sense that when I read code like the following, I
 *expect* it to fall-through

 Yeah, does seem like it could get confusing to mix and match.  Do you
 think it would be ok if case blocks were required to end in "break" (or
 later "fallthrough" if we want that) to make it clear, with a parse-time
 error resulting if it's missing?

 Otherwise I'm fine leaving the switch consistent with C-style
 (fallthrough/breaks are up to coder to do right).

-- 
Ticket URL: <http://tracker.bro-ids.org/bro/ticket/754#comment:27>
Bro Tracker <http://tracker.bro-ids.org/bro>
Bro Issue Tracker



More information about the bro-dev mailing list