From: Chris Moline Date: 2001-06-01T20:52:16+09:00 Subject: [ruby-talk:16135] Re: Block arguments vs method arguments On Fri, Jun 01, 2001 at 06:19:54AM +0900, Sean Russell wrote: > 1) There are better (IMHO) solutions for the problem. I, personally, liked > the earlier suggestion of defining scope with { |:var| ... }, and I'm not > sure whatever happened to this recommendation. I don't like either : or < >. Someone here made the suggestion that we use ( ) instead of | | and make them to mean that its local to the block. I like this proposal as it makes things more consistent IMO. > 3) An argument for ':var' over '' can be made in recognizing that: > my_proc { | var1, :var2 | } > is more flexible than > my_proc { < var1, var2 > } > I shudder to imagine that attempts to solve this might lead to declarations > such as: > my_proc { < var1 > | var2 | } If I remember right the var1 would behave as it does now while the :var2 would be local. Am I right?? Why not just change | | to ( ) and then if you need to change a var just do reciever.method do( arg ) var_in_scope = arg end > I agree with the philosophy of keeping maximum backwards compatibility, but I > think that in some cases it is much better lose backwards compatibility for > the sake of clean syntax. I don't think that "<...>" is powerful enough to > sufficiently solve the scoping "issue", and that using it is a contract for a > further syntactic change. I don't agree overly much with backwards compatibility. I can undestand why people want it but it seems to me that it hampers development and progress and that eventually the language becomes ugly. I think we need to find a better way of supporting backwards compatibility. Perhaps some kind of built in translation ability?? ( just an idea ). > > 4) '<' and '>' are sharp, pointy glyphs, denoting hard, angry imagery; they > are unfriendly characters, and someone could get hurt using them. Studies > show that people who overuse '<' and '>' are more prone to violence than > those who don't; this is supported up by the fact that there are very few > incidences of workplace violence in Lisp-shops. (Ahem...) lol Sincerly, Chris Moline