Add "Declare" keyword for interfaces for consistency

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Add "Declare" keyword for interfaces for consistency

Post by Mistrel »

We can already declare function return types like this:

Code: Select all

Declare.s name()
Procedure.s name()
Prototype.s name()
Interfaces are kind of weird in that you have to declare the return type after the function name:

Code: Select all

Interface ISomeInterface
  name.s()
EndInterface
For consistency, it would be nice to see something like this instead:

Code: Select all

Interface ISomeInterface
  Declare.s name()
EndInterface
I'm already conditioned to look on the left side for the return type. Examining interfaces is a jarring exception.