type-hinting functions with variable (but known) return types

2013-12-11 Thread Phillip Lord
Sorry, full of questions about type hinting at the moment. I've found myself writing a lot of expressions like this: ^"[Lorg.semanticweb.owlapi.model.OWLClassExpression;" (into-array OWLClassExpression [(ensure-class o name) (ensure-class o disjoint)]) N

Re: type-hinting functions with variable (but known) return types

2013-12-11 Thread Cedric Greevey
The only thing I can think of off the top of my head is to write a hinted-array macro that turns (hinted-array Class expr) into ^Class (into-array Class expr). Emitting type hints or other form metadata in macros is do-able, but sometimes a bit tricky. Something like this might work (untested): (d