On Fri, Feb 1, 2019 at 10:24 AM Robin Sommer <ro...@corelight.com> wrote:
> On Thu, Jan 31, 2019 at 16:29 -0800, Vern Paxson wrote: > > > > global my_event: event(a: count, b: string); > > > event my_event(b: string) > > > { print "my_event", b; } > > it *looks* like an error to not have matching > argument lists. Is there some syntax that would make it more clear > what's going on? Not sure. If the syntax were different, that introduces a "one more thing to remember" issue, so I might prefer consistency with other function-like constructs. Any other language we know that has multi-body functions we can reference for ideas? Did it look like an error in the sense of the user making a mistake or in the sense of traditional way functions in other languages like C/C++ require matching signatures? In the former, I think the semantics/intentions are actually clearer than before: the user didn't list a parameter because they don't care about it, so why make them. I know what event they want because they use unique names and the parameters they listed do map in a valid way. On the traditional side of things, overloading seems it's maybe a legit reason for requiring matching signatures, but I also explained why I think overloading wouldn't make sense in the context of events. - Jon _______________________________________________ zeek-dev mailing list zeek-dev@zeek.org http://mailman.icsi.berkeley.edu/mailman/listinfo/zeek-dev