allow line break at operators
When writing a long expresion, one usually would like to breakit into multiple lines. Currently, you may use a '\' to do so, but it looks a little awkward (more like machine-oriented thing). Therefore I start wondering why not allow line breaking at an operator, which is the standard way of breaking a long expression in publication? Here is an example:
#the old way
x = 1+2+3+4+\
#the new way
x = 1+2+3+4+ #line continues as it is clearly unfinished
Of course, the dot operator is also included, which may facilitate method chaining:
x = svg.append( 'circle' ).
Re: allow line break at operators
Yingjie Lan wrote:
> #the new way
> x = 1+2+3+4+ #line continues as it is clearly unfinished
Genrally I prefer this way.
> Of course, the dot operator is also included, which may facilitate method
> x = svg.append( 'circle' ).
Dot-ended is to tiny thing that might cause oversights. *If* it'll be used
as a secondary option I think it doesn't matter, otherwise *if* use as a
compulsory writing mode I'd say it is pretty mistake prone.
|All times are GMT. The time now is 05:13 AM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.