[Bro-Dev] [Proposal] Language extensions for better Broker support

Matthias Vallentin vallentin at icir.org
Tue Dec 13 11:51:39 PST 2016

> I don't really like using a record like that, as that would associate
> specific semantics with what's really a user-definable type. 

It was only meant to illustrate the idea of error handling and function
composition. These ideas still hold up when substituting the
user-defined result type with the proper language-level construct.

> We could generalize that to support other data types as well, although
> I don't really see a need for going beyond opaque right now

Going beyond opaque would have the advantage of applying a uniform error
handling strategy to both synchronous and asynchronous code. That's not
needed right now, because "when" doesn't make it easy to handle errors,
but it could be an opportunity to provide a unified mechanism for a
currently neglected aspect of the Bro language.

> Maybe the conversion to bool that I proposed originally should really
> be a conversion to a dedicated error type, so that one can
> differentiate what happened. 

I like that.


More information about the bro-dev mailing list