On Thu, May 14, 2015 at 5:12 PM, Poul-Henning Kamp <[email protected]> wrote:
> --------
> In message 
> <CABoVN9ADMWEfJtP1epOO_s==kgorzb_jk8smvuhtrtvmwrz...@mail.gmail.com>, Dridi 
> Boukelmoune writes:
>
>>If you don't like the idea of the union type, there's a typo you can fix with:
>
> I do indeed not like unions.
>
> I use them only when they are absolutely necessary to share a memory 
> allocation
> is a quasi-type-safe way, where the chances of f**kups are well handled in 
> other
> ways.
>
> I never use them to pretend I have type-safety on a single pointer.

It was never about safety, but readability.

With many NULLs in the code, I need to go other places to fully
understand a piece of code. Named argument make sometimes
things more explicit:
-       VCL_recv_method(req->vcl, wrk, req, NULL, NULL);
+       VCL_recv_method(req->vcl, wrk, req, NULL, no_specific);

I also just assumed switching to a union type would not add
overhead in the compiled binary.

Cheers,
Dridi

>>   sed -i s/SHA256ctx/SHA256Context/ include/vrt.h
>
> done.
>
> --
> Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
> [email protected]         | TCP/IP since RFC 956
> FreeBSD committer       | BSD since 4.3-tahoe
> Never attribute to malice what can adequately be explained by incompetence.

_______________________________________________
varnish-dev mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev

Reply via email to