Feature request: one-statement functions without brackets
mike
vertex at gmx.at
Tue Apr 3 13:58:23 PDT 2007
Am 02.04.2007, 11:29 Uhr, schrieb Lionello Lunesu <lio at lunesu.remove.com>:
> Downs wrote:
>> Feature request: Allow functions of the form function-declaration
>> statement;
>> Example: int test() return 5;
>> This would make the function syntax closer to the way if/else, while,
>> for and similar
>> statements' blocks are handled now, potentially making parsing easier.
>> It would
>> also help with internal consistency.
>> Also, it would allow methods like void test() synchronized(this) { },
>> which to me just
>> looks cleaner than using brackets to contain a single statement.
>
> I never thought of this, or needed this, but it makes sense though. let
> { } be used for grouping statements. Nice.
>
> L.
Nice indeed.
--
Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/mail/
More information about the Digitalmars-d
mailing list