rename IEventInvokable to IInvokableEvent

Issue #345 new
Asfalan created an issue

Commit e3132b3 recently introduced the new interface IEventInvokable. I would like to propose to rename this interface to IInvokableEvent. – And likewise, to rename INotifyEventInvokable to IInvokableNotifyEvent.

These are very frequently used identifiers, and language-wise IInvokableEvent aligns a lot better to other Delphi identifiers like TContainedObject (derived from TObject) as well as the English language in general. Also, adjective-only identifiers like TObservablerather produce identifiers like TObservableObjectList (both Spring4D types) where the adjective remains in front of the noun; (unless the adjective is dropped altogether, of course). That said, I do not see a reserved spot for an IInvokable-derived event type here. – Last but not least, I admit, I personally take umbrage at identifiers reversed. It is really cumbersome language (to read)!

Unless there is more consideration to this than I can see, I would kindly ask to accept this proposal, pretty please? :)

git apply IInvokableEvent.diff

Comments (3)

  1. Stefan Glienke repo owner

    I get your point and I understand the reasoning. Would I just come up with completely new and unrelated types I would have gone with that naming. However the choice was because some functionality from IEvent went to that type - naming it not like the previous one plus a suffix makes it undiscoverable when typing IEvent.

  2. Asfalan reporter

    Well, the discoverability is eased since Delphi 10.4 where the code completion suggests more than starts-with matches. And let me also tenaciously suggest to immediately deprecate IEventInvokable<T> to detour developers to the more suitably named type:

      IEventInvokable<T> = interface
      end deprecated 'Use IInvokableEvent<T>.';

    – To conclude this ticket, I very much hope that you maybe will change your mind on this until you release a next version of Spring4D. Whatever the case, Spring4D will remain to be a fantastc library!

  3. Log in to comment