Adding modifiers to NCI
Simon Cozens
simon at simon-cozens.org
Mon Dec 22 05:10:14 UTC 2008
Hello all,
I've started looking at adding Postgres bindings to DBDI, and hit a bit
of a wall; it needs its bind parameters passed in as an array of
strings. Now there is an undocumented "T" signature for char** that's
been sitting there for a while, but before I found it I got a bit
frustrated about the state of NCI signatures. They've expanded a little
randomly, whether it's the fact that "s" means a short but "S" means a
string, or the 2/3/4 grabbing-numbers-from-a-PMC signature.
The PDD states that:
At some point punctuation may be used as modifiers on the function
parameters, in which case each parameter may be represented by multiple
letters.
I think we've reached that point. My plan is to add two modifiers: "$"
means "get this type from a PDD" and "@" means "this is an array". Hence
2/3/4 would be replaced by $s, $i and $l respectively.
"T" would probably become "@S".
I don't think we should go down the road of a completely new
DSL for function signatures - please no, let's not overcomplicate until
we need it - but I think we do need something a little more flexible,
and a little better organised, than what we have already.
Thoughts?
Simon
--
Move 1
pdcawley [11k]: This is, of course, where it all started to go wrong.
More information about the parrot-dev
mailing list