Implicit line continuations for contents of unclosed Parens
Posted: Fri Jul 18, 2008 4:14 am
Like Cobra Python is mainly line based but this is alleviated by supporting an implicit line continuation
for an expression with unclosed/unbalanced parentheses. This is extremely convenient.
Cobra already has (undoc unmentioned?) support for this for array, list and dictionary literals e.g.
compiles fine
Theres supporting (spaceAgnostic) coding existing for () enclosed method calls (currently not enabled).
I dont know what the issues may be with supporting implicit line continuation with arbitrary paren enclosed expressions but
it would ease code layout (avoiding a major area of pathologically long lines) and/or line continuation clutter
if at minimum the above code for method calls were enabled and the same support provided on method (and signature) definitions
allowing something like
i.e multi lines for call args and parameter declarations.
comments?
for an expression with unclosed/unbalanced parentheses. This is extremely convenient.
Cobra already has (undoc unmentioned?) support for this for array, list and dictionary literals e.g.
- Code: Select all
a = { 'a':1,
'b':2,
'c':3,
}
b = [ 1,
2,3,
4,
]
c = @[
'a',
'b','c',
'd',
]
compiles fine
Theres supporting (spaceAgnostic) coding existing for () enclosed method calls (currently not enabled).
I dont know what the issues may be with supporting implicit line continuation with arbitrary paren enclosed expressions but
it would ease code layout (avoiding a major area of pathologically long lines) and/or line continuation clutter
if at minimum the above code for method calls were enabled and the same support provided on method (and signature) definitions
allowing something like
- Code: Select all
.foo('argument Number 1',
'argument Number2',
'aregularArgument number3' )
...
def foo(arg1 as String,
arg2 as String,
arg3 as String ) is shared
print "in foo"
# do something
print 'foo done'
i.e multi lines for call args and parameter declarations.
comments?