Welcome to the main channel on the development of MoarVM, a virtual machine for NQP and Rakudo (moarvm.org). This channel is being logged for historical purposes. Set by lizmat on 24 May 2021. |
|||
00:55
gfldex left
00:57
gfldex joined
00:58
japhb left
01:00
japhb joined
01:06
japhb left,
gfldex left,
japhb joined,
gfldex joined
01:13
japhb left
01:14
japhb joined
01:31
japhb left
01:33
japhb joined
02:04
guifa left
02:18
guifa joined
03:01
guifa left
|
|||
nine | Speaking about variadic functions. We have discussed how to make it possible for the caller to provide type info for the arguments. I just realized, they usually already do. E.g. in printf("%f %d", 1.0, 1) the format string contains all the required information. | 07:20 | |
The example also shows that this information is passed in a way that is specific to the variadic function. | |||
What if the variadic trait takes a Code object that gets passed the argument capture and returns a list of type objects? That would cover all possible situations. | 07:21 | ||
But, but, but, wouldn't that be excruciatingly slow? Not if the dispatcher is smart enough to cache this type list and guard on the argument(s) that contain the type information (usually the first arg). | 07:22 | ||
Then we'd do it only once per format string in the printf example. | 07:23 | ||
lizmat | this is a same approach that the zprintf in 6.e takes (based on RakuAST) | 07:49 | |
11:25
guifa joined
12:58
guifa left
20:31
[Coke] left
22:27
[Coke] joined
22:52
guifa joined
23:10
japhb left
23:17
japhb joined
23:42
japhb left
23:43
japhb joined
|