Syntactic relaxation on type declarations
Posted: Sun Dec 07, 2008 9:07 pm
The current syntax starts with:
The relaxation would be:
(1) Allow those three parts (is, has, inherits) on the same line as "class ..."
(2) Allow them in any order.
So you could say:
While Cobra has generally favored having a uniform syntax between developers, I have found the current strict syntax for class declarations to be annoying. At least one other person has brought this up.
This would apply to "interface" and "struct" as well.
Comments?
class <ClassName>
[is <AccessModifiers>]
[has <Attributes>]
[inherits <BaseClassName>]
...
The relaxation would be:
(1) Allow those three parts (is, has, inherits) on the same line as "class ..."
(2) Allow them in any order.
So you could say:
class Foo inherits Bar is internal
def baz
pass
While Cobra has generally favored having a uniform syntax between developers, I have found the current strict syntax for class declarations to be annoying. At least one other person has brought this up.
This would apply to "interface" and "struct" as well.
Comments?