Jochen Theodorou to Anton Shepelev: > > Jochen Theodorou: > > > > > Frankly... for years we have been defending this > > > position, but now, with so much distance I actually > > > really wonder why we keep this. > > > > Perhaps it would have helped if you had documented not > > only language features but also their rationale > > (justification), at least is difficult, debatable cases. > > the reason is easy: it reflects the implementation. But > the implementation can be changed
The implementation reflects the implementation? I do not understand. > > In another reply, Maarten Boekhold refers to section 3.4 > > (Variables) of the "Program structure" document, which > > has the following to say about assignments to undeclared > > (or undefined?) variables: > > > > if the variable is undeclared, it goes into the > > script binding. The binding is visible from the > > methods, and is especially important if you use a > > script to interact with an application and need to > > share data between the script and the application. > > I think you should read the whole chapter 3 > http://groovy-lang.org/structure.html#_scripts_versus_classes > Otherwise you miss out on some of the concepts and I think > this passage alone then makes much less sense. On the > other hand Maarten really explain most of that already in > his mail I have read that chapter, and the passage makes perfect sense. Even normal procedural programming is emulated using OOP techniques. Among other things, that chapter says: You can also mix methods and code. Whereas methods are also code, I believe it would be much clearer if it said "immediate code" -- code that is executed immediately rather than compiled into a callable method. > > The explanation is OK, but I failed to look into that > > document. Do you think you can provide better > > documentation at a better place? If so, I should > > certainly appreciate it. I also thank Maarten for > > reply. > > A better place? What was wrong? I am not sure, but we both failed to find that paragraph until Maarten pointed it out. But now that I think about it again, it is the right place.