From: John Joyce Date: 2008-07-11T11:46:09+09:00 Subject: Re: Why Ruby interpreter is writed in c (not in c++)? On Jul 10, 2008, at 8:31 PM, phlip wrote: > Ranieri Teixeira wrote: > >> I've downloaded the sources of Ruby 1.8.7-p22 and compiled it with >> MS CL >> compiler. > > What a pain! Next time, get CygWin, and compile with GNU C. > > > Ok, very well. But, the code is in structured C, not in object >> oriented C++. Why? C++ doesn't provides the sabe low level >> facilities as C >> and the powerful abstractions, and good practices from the OOP >> paradigm? > > All system-level engines are written in C, not C++. C has been a > Standard for much longer, and has more compliant compilers. So any > engine that wants to run on the widest number of platforms must use > C. It compiles for everything from wristwatches to Mars Rovers. > > The point of OOP is rapid code changes. That contradicts the goal of > super-widespread portability. No matter what your language, you must > chose one or the other, not both. And Ruby is indeed coded in Object > Oriented C. The ++ does not magically make every program OO. > > C++ would not necessarily make Ruby easier to code; C++ objects can > never map directly onto Ruby objects. > > -- > Phlip > But Objective-C may soon.... MacRuby....