From: Frank Schmitt Date: 2003-10-09T19:12:24+09:00 Subject: Re: Extension Language for a Text Editor Simon Strandgaard writes: > On Thu, 09 Oct 2003 06:06:32 +0900, Nikolai Weibull wrote: > > * What would be easier to do using Ruby? > > undo/redo/macros.. The code which is responsible for this only takes up > 119 lines of Ruby code. This is more complex in C++ because you cannot > #clone arbitrary objects. If you are talking about user-defined class hierarchies, you *can* clone them, as well - it just requires extra work: class Base { virtual Base* clone() = 0; }; class Derived1: public Base { virtual Base* clone() { return new Derived1(*this); } }; class Derived2: public Base { virtual Base* clone() { return new Derived2(*this); } }; > unittesting: AEditor has about 440 testcases and 1400 assertions. > unittesting is annoying in C++. In Ruby its easy. Why is unittesting in C++ annoying? I have an application with 200+ testcases and 400+ assertions, written completely in C++. The only thing that annoys me is that I can't easily add/remove tests without recompiling - some day I'll have to write a ruby wrapper to do this :-) kind regards frank -- Frank Schmitt 4SC AG phone: +49 89 700763-0 e-mail: frankNO DOT SPAMschmitt AT 4sc DOT com