[Bro-Dev] #983: Deep typing bug
Bro Tracker
bro at tracker.bro.org
Mon May 13 08:09:32 PDT 2013
#983: Deep typing bug
----------------------+------------------------
Reporter: seth | Owner:
Type: Problem | Status: new
Priority: High | Milestone: Bro2.2
Component: Bro | Version: git/master
Resolution: | Keywords:
----------------------+------------------------
Comment (by jsiwek):
Replying to [comment:5 vern]:
> I've lost track - has <type> syntax already been introduced?
No, nothing uses that right now.
> If not, then I'm wondering if it's the right way to go here. You could
imagine at least some of these more directly mirroring the declaration
syntax, such as
> {{{
> vector of xyz (...)
> }}}
That works well for sets but looks awkward for table & vector (because the
ctor params seem to apply to the yield type and not the container itself):
{{{
set[TypeList](...) # looks fine
table[TypeList] of Type (...) # the ctor params seem to associate with
Type
vector of Type (...) # same thing
}}}
Then adding in a record ctor ruins it for everybody. If it were to be
`record<Type>(...)`, then it's entirely different from other ctors and we
need to add `<Type>` syntax just for that case. If it were to be
`record[Type](...)` or `record of Type (...)`, then it fits in with other
ctors, but is a greater mismatch with the way records are declared.
Any more preferences/ideas?
--
Ticket URL: <http://tracker.bro.org/bro/ticket/983#comment:7>
Bro Tracker <http://tracker.bro.org/bro>
Bro Issue Tracker
More information about the bro-dev
mailing list