On 29 Apr 2010, at 10:52, Graeme Geldenhuys wrote:

Marco van de Voort het geskryf:
In our previous episode, Graeme Geldenhuys said:
Why is the usage of 'deprecated' inconsistent, depending where you use it.

As always, because Delphi does. See the recently submitted fcl-passrc
bugreports for more examples.

Shouldn't that inconsistent syntax be limited to the Delphi compiler mode
only? Like many other things are.

The general reason for putting modifiers before the semicolon in case of type declarations is that there can be ambiguity in other cases (modifiers are not reserved words, so in principle the modifier can also be used as a type or variable name).

In case procedures/function/method declarations, this is not the case since an identifier can never follow a function/procedure/method declaration: they have to be preceded either by
* "procedure"/"function" for routine declarations
* by "var"/"const"/"type" for var/const/type declarations
* by "property" for property declarations
* by "public"/"(strict) protected"/"(strict) private for field declarations

Conversely, adding it before the semicolon in case of procedure/ function declarations would be inconsistent with how other modifiers have always been used there.

So no, it should not be changed in FPC mode like many other things have been changed in the past, because it would have to be changed back later anyway (just like http://wiki.freepascal.org/User_Changes_Trunk#Passing_derived_classes_to_var-_and_out-parameters , http://wiki.freepascal.org/User_Changes_2.4.0#Order_of_field_and_method.2Fproperty_declarations etc)


Jonas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to