From: brk@... Date: 2001-03-03T04:33:06+09:00 Subject: [ruby-talk:11913] Re: Option to allow Python style indenting? What would be *really* useful would be a package which provided an Abstract Syntax Tree, and a method on Kernel which would load a package from an AST. This would allow one to bypass the normal parsing process altogether, and supply accurate __LINE__ information even though the source wasn't normal Ruby. More importantly, syntax extension packages would only parse the file once, rather than preprocess it and then send it to the normal Ruby parser to be parsed a second time. This (could) allow for things like Perl's Inline module, hygenic macros ala Dylan, optional static typing, etc., or even Python-style indenting, to have a much tighter integration with the Ruby runtime, without changing the core language. Clearly this is an area where Ruby's flexibility makes this a much more realistic possibility than in other languages. RCR, anyone? Bryn > -----Original Message----- > From: matz@zetabits.com [SMTP:matz@zetabits.com] > Sent: Thursday, March 01, 2001 7:25 PM > To: ruby-talk@ruby-lang.org > Subject: [ruby-talk:11882] Re: Option to allow Python style > indenting? > > Hi, > > In message "[ruby-talk:11878] Re: Option to allow Python style indenting?" > on 01/03/02, Eric Sven Ristad writes: > > |A central beauty of Ruby is that most everything is EXPLICIT. > > It's very interesting to hear this. I think Python people are stick > to this principle far more than Ruby people, EXCEPT block end mark. ;-) > For example, Python requires explicit small <-> long conversion of > integers, whereas Ruby doesn't. > > I want Ruby to be as explicit as possible where it should be explicit, > and as implicit (or in other word, smart) as possible where it doesn't > make things confusing. > > If you feel like the above, it means I succeeded in the language design. > I'm very happy. > > Regarding block-by-indentation, I don't like the style, so that it > wouldn't be in the core. But filter or preprocessor like Cugar might > be useful. Cugar is the preprocessor to enable Python style formatting > in C . > > matz.