[illumos-Developer] Illumos issue 278: (eliminate python dependency from zfs command)

Gordon Ross gordon.w.ross at gmail.com
Wed Oct 20 19:22:34 PDT 2010


see below

On Wed, Oct 20, 2010 at 3:31 PM, Alexander Stetsenko <ams at nexenta.com> wrote:
> > On 10/20/2010 08:07 AM, Gordon Ross wrote:
> > Could you please provide a pointer to the (python?) code this replaces?
>
> It should replace all cmd/pyzfs lib/pyzfs stuff.
> I still have to provide replacement for allow/unallow, so python code is
> still not removed  - and there is no webrev available for it.
>
> You can look into lib/pyzfs/holds.py (for holds subcommand),
> lib/pyzfs/common/userspace.py and lib/pyzfs/common/groupspace.py
> (for userspace/groupspace one) and lib/pyzfs/common/ioctl.c for both.
>
> cmd/pyzfs calls pyzfs module.

Thanks, that's what I wanted to review for context.

After looking at lib/pyzfs, I have a suggestion:
Write a C++ library of classes following the design of
the classes provided in the python ZFS library code.

I realize the "C++ is Evil!" bigots may jump on my case
over this suggestion, but for this particular usage, I'd
suggest this is a better approach than converting that
code into a language with no classes or inheritance.

My humble opinion.

(And if you haven't guessed, I don't subscribe to the
"C++ is Evil!" fan club.  My view is that no language
prevents people from writing unmaintainable code:)

Gordon



More information about the Developer mailing list