[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [RFC] translators



On Wed, May 31, 2000 at 10:29:51AM -0500, Neal H Walfield wrote:
> Having written several translators myself, I find that the hardest
> part is discovering the functions that I need to override and the
> correct prototypes.  To solve this (other than better documentation),
> I believe that rather than leaving the linker to do the function
> overriding, the hurd should be more device driver'ish whereby the main
> function makes a register file operations type call, for instance:
> 
>    register_translator(fops)
> 
> where fops is a structure of functions just like the linux fops structure.
> 
> struct trivial_translator_ops
> {
>   int (*read)(struct inode *, struct file *, off_t, int);
>   ...
> }

This sounds great.  What I see in current implementation is a hack to reach
OO design.  But it's much more natural for programmers to define things in
that way.  This will open the door wider for using C++ too.  Why to use
exotic ways to do simple things?

-- 
Ognyan Kulev <ogi@fmi.uni-sofia.bg>, "\"Programmer\""



Reply to: