Adding modifiers to NCI

Allison Randal allison at parrot.org
Sat Dec 27 06:33:30 UTC 2008


chromatic wrote:
> On Friday 26 December 2008 20:12:00 Allison Randal wrote:
> 
>>> I also don't see any examples of out parameters.
> 
>> Toss me some examples and I'll do a first pass at fitting them into the 
>> hypothetical new syntax.
> 
> See t/pmc/nci_52.pasm and nci_i33 in src/nci_test.c.  The signature for this 
> function is "i33", which means it returns and int and takes two pointers to 
> ints.  It modifies the pointed-to ints in place and returns an int value.

Already in the hypothetical syntax:

  T*T*->T

Seems clearer than 'i33'.

>> chromatic wrote:
> 
> What could be more consistent with 40 years of C function signatures than the 
> same C function signature syntax that C function signatures have had for 40 
> years?

NCI doesn't use the C function signature syntax. So, you're either 
repeating something that's simply not true (which seems unlikely), or 
you're making a metaphorical point. If you're making a metaphorical 
point, perhaps you could be more explict: in what way(s) are the current 
NCI signatures similar to C function signatures? What are the specific 
mental associations you see captured in the current syntax that aren't 
captured in the hypothetical syntax?

I'm not invested in the hypothetical syntax, but it's a useful framework 
for the conversation.

Allison


More information about the parrot-dev mailing list