On 4/30/06, Phil Jackson <phil / shellarchive.co.uk> wrote: > Hi all, > > I've started to write my own editor (in c) which shall be extendible by via > Ruby. I have a question about the design, as this is a 'from scratch' > approach I'm taking do you think I should write the basics in C and then > wrap it up with ruby or should I impliment with reliance on the Ruby types > from the start? For example, say I have a simple buffer object: > > typedef struct _BUFFER { > char *filename; > char *name; > } Buffer; > > Should I use Data_Wrap_Struct() to wrap this up or should I build a class > from scratch in Ruby using Ruby types. Either way the editor remains > extendible in C and Ruby but once I go for the second option embedding any > other enterpriter (Python, Perl...) goes out of the window. > > Let me know your thoughts (which aren't allowed to include "do we really > need another editor" :)). > > Cheers, > Phil > > My thoughts are implement the whole thing in Ruby and then only bother to write the parts in C where there is a reason (performance) to do so. pth