Re: Introducing "Array Of" RFC
On 1/19/14, 9:13 AM, Philip Sturgeon wrote:
> I think its a nice logical improvement which syntactically offers a
> replacement for looney boilerplate code, exactly like Variadics which
> a LOT of people are excited about.
Actually variadics solves a problem that can't be solved other ways,
namely by-ref for an unknown number of arguments. There is no userspace
boilerplate code, looney or otherwise, that can do that.
I won't argue whether the base need is great enough here. I am sure it
is to some people. I do have an issue with the idea that the right
solution is a full hash table scan on every function call. I have a
feeling that if this makes it in this is one of those features that will
be high my list for optimization/refactoring when I run across it in
code. As in, replace the per-call hash scan with a single userspace scan
that is only done once earlier in the stack. From a performance
perspective the only-done-once userspace version is extremely likely to
outperform this built-in per-call check assuming more than a trivial
amount of calls to the function in question.
-Rasmus
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Thread (73 messages)