Re: [Bro-Dev] functions truly as globals?

2013-09-30 Thread Siwek, Jonathan Luke
> I think that in addition to changing those to const we'd change Bro to not > accept creating "global" functions. You still effectively have global functions if you have a global record w/ a field that is of function type. Do we do something about that? > Are there other inconsistencies? I t

Re: [Bro-Dev] functions truly as globals?

2013-09-27 Thread Seth Hall
On Sep 27, 2013, at 4:28 PM, "Siwek, Jonathan Luke" wrote: > Changing most/all existing "global" function declarations to use "const" > instead would help some, but what about the other inconsistencies? I think that in addition to changing those to const we'd change Bro to not accept creatin

Re: [Bro-Dev] functions truly as globals?

2013-09-27 Thread Siwek, Jonathan Luke
>> some_func = my_func; > > Please, no ... That's not only hurting readability profoundly but also > prevents function-level code optimization. Just imagine the impact > once we start compiling scripts ... Doesn't readability improve if it makes functions behave in a way more consistent w/

Re: [Bro-Dev] functions truly as globals?

2013-09-26 Thread Seth Hall
On Sep 26, 2013, at 6:34 PM, Robin Sommer wrote: > Please, no ... That's not only hurting readability profoundly but also > prevents function-level code optimization. Just imagine the impact > once we start compiling scripts ... Cool, I agree. I just had to make sure. :) .Seth -- Seth Hal

Re: [Bro-Dev] functions truly as globals?

2013-09-26 Thread Robin Sommer
On Thu, Sep 26, 2013 at 16:06 -0400, you wrote: > some_func = my_func; Please, no ... That's not only hurting readability profoundly but also prevents function-level code optimization. Just imagine the impact once we start compiling scripts ... Robin -- Robin Sommer * Phone +1 (510) 72

[Bro-Dev] functions truly as globals?

2013-09-26 Thread Seth Hall
At scriptland, when we define function prototypes we define them as globals but they seem to be turned into consts in the core. Does it make sense to actually make them globals? It would allow me to do runtime monkey patching… which I'm not saying I'd ever do (wink, wink). But it would make r