@arekinath Neat, I think that'd work well. The only downsides I see of using an 
`NVList` directly are:
- Uniqueness checking is an `O(# of keys)` operation (whereas Lua tables use a 
hash table). I'm sure we could build a workaround to deal with this.
- People reading Lua documentation to learn how to write channel programs might 
be confused when they aren't able to return a table (even though presumably 
we'd still let them use tables within the programs in other places).

I'd prefer to keep the return value translation as is for now, just to avoid 
pushing extra work into this PR. (We have several more channel programs 
features we'd like to upstream that are blocked on this review.) However, since 
userland has to interpret the return value as an `nvlist` either way, I can't 
see any reason we couldn't implement the new `NVList` Lua type later.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/397#issuecomment-307932711
------------------------------------------
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/Tffb276f83a8ecdd2-Mf62bcbaa92012ec2d4e8acb8
Powered by Topicbox: https://topicbox.com

Reply via email to