From: "Mauricio Fernández" Date: 2003-06-24T01:18:30+09:00 Subject: Re: editor / ide recommentation on Windows On Tue, Jun 24, 2003 at 12:58:13AM +0900, Kent Dahl wrote: > > > Which is by definition impossible for Ruby, Python, PHP, Perl and > > > other languages. All you can get are refactoring suggestions, most of > > > them not more comfortable then a good grep result. > > > > Really? Why do you say that? I find it interesting that the first > > language for which refactoring was implemented was Smalltalk, which one > > could argue is MORE dynamic than any of the languages you mention. So it > > seems that a refactoring engine is quite plausible for Ruby (and other > > languages like it). > > The dynamic nature is only part of the equation. AFAIK, the syntax of > SmallTalk is a lot simpler (machine-wise atleast) than Ruby. The (lack > of) operator precedence in ST springs to mind. Predeclared variables in > ST is a big help also (regarding the "is this a local variable or a > method?" problem). And I don't think ST has the mutable closure > possibilities we have with our blocks. (Pass a block to some method and > suddenly my locals have mutated? Good luck refactoring with that in > mind!) Markus Denker held yesterday a talk at Euruko03 on Squeak's devel. environment (refactoring browser, etc). I asked him if all he was showing to us depended on being image based, and his first answer was that refactoring should be possible even if not. However, I met him on the way home once Euruko03 was finished and after chatting for quite some time it became clear that, even if we are not image based, we definitely need to have a Ruby interpreter inside the editor, which has got to know all of your code (+ libs). This would be slow (imagine parsing all your code every time you change something), so you'd perhaps like to save the AST plus state up to that point, but then *you have an image* :-) So it seems there's definitely things Smalltalk does we won't be able to do for quite some time because of * dynamic typing * not being image based > I'd hazard to guess you'd need a full blown Ruby parser to do any safe > and useful refactoring. In order to do the things we saw yesterday, a parser is not enough, you need a full-blown interpreter. -- _ _ | |__ __ _| |_ ___ _ __ ___ __ _ _ __ | '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ | |_) | (_| | |_\__ \ | | | | | (_| | | | | |_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_| Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com Never trust an operating system you don't have sources for. ;-) -- Unknown source