My biggest gripe against Interfaces is that you can’t easily jump from where they are used back to where they are implemented. Using the “View Definition” link takes you back to the interface definition.
This totally undermines one of the best features of the IDE.
It would be really cool if they allowed you to select a default implementation, and be able to “View Implementation”.
As a one man developer team, this above limitation meant that I would never use interfaces all over the place. It is easier just to define a class and use it.
Where interfaces have really come into their own, for me, is where I want to swap between a range of objects. As soon as you have a procedure that will take two or more object types as a parameter, interfaces become a no brainer.
Yes I do miss this feature - FWIW I use coderush in visual studio and it has shortcuts for this
I have suggest to embarcadero that navigating code in delphi is really quite poor by modern IDE standard - supposedly LSP would fix that but I’m still waiting for that moment.
Modelmaker Code Explorer (MMX) is definitely worth checking out, it’s been the first thing I install into the IDE for almost 20 years now.
Unfortunately it doesn’t find the implementation of interfaced methods from the call site though. In general MMX only parses the current unit, it doesn’t attempt to understand your project source code as a whole.
It particularly excels when you have multiple classes in the one unit, for instance it’s great when you are reading through the VCL/FMX source code.
I have split this topic out of the interfaces discussion - if you want to continue discussing code navigation - you are in the right place, for interface benifits etc - go here.
I have tried MMX a few times over the years but never really got to grips with it.
Since code navigation is something I struggle with in the delphi IDE, I installed it today and will give it another go.
I do find it a bit confusing - seems like icon and option overload at the moment - I feel like I need to dial it down a bit and turn on features bit by bit - which is what I did with coderush (to stop accidently invoking features and wondering what I had done!).
That’s what has made me hesitate in the past, the screenshots look overwhelming. But I’ve heard enough positive things about it that I should probably give it a go.
I am slowly discovering how to customise MMX - the toolbars are all customizable which is great - I don’t find the need for all the creation wizards etc - creating a class or method in a dialog just seems weird to me, and I can write the code faster.
Anyway, I’m going to par it back to the bare minimum - focusing on the navigational features first.
The dialog is called with a shortcut (default Ctrl+Alt+M) and MMX tries to infer the parameter types, so I could accept the values immediately. After that I use the Parameter Wizard to edit the parameter names, which I also could have done in the first dialog.
At the bottom of www.mmx-delphi.de is a link to a video I made for a German CodeRage session. There should already be an English version, but unfortunately I didn’t find the time yet.