From: Logan Capaldo Date: 2007-04-20T23:39:08+09:00 Subject: Re: highlighter for operator precedence ------=_Part_124739_19872910.1177079944683 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 4/19/07, Mike Schwab wrote: > > Is there a web site that will highlight code to show who Ruby will send > each message to? I like playing around with parentheses and the ternary > operator, and I want to explore the precedence distinction between {} > and do end. > > Some find it unnecessary to remove all implied parentheses and still > strive for one-liners, but I find it makes the code more readible, and > more emulatable. I think a visual tool for learning these rules could > make Ruby more accessible. > > Once that were ready, would it not be a small step to make a tool that > strips the unnecessary parens itself? If an expression is so complicated you need a tool to strip "unnecessary" parens from it, what makes you think you won't need a tool to put the parens back in when you go to read it again and figure out what it does? A tool to find and exploit the dark corners of ruby's precedence rules to avoid parentheses seems to be missing the forest for the trees. If you have a complicated expression with a lot of parens, maybe its time to name some of those sub-expressions, not automate its obfuscation. -- > Posted via http://www.ruby-forum.com/. > > ------=_Part_124739_19872910.1177079944683--