Attributes on Interfaces ... please!

The use of specific JADE features and proposals for new feature suggestions
User avatar
BeeJay
Posts: 312
Joined: Tue Jun 30, 2009 2:42 pm
Location: Christchurch, NZ

Attributes on Interfaces ... please!

Postby BeeJay » Thu Oct 02, 2014 10:06 pm

In a similar vein to Allistair's posting regard static methods, I'd love to see Interfaces in Jade extended to include properties. This would then logically extend to being able to define MKDs of interfaces and use those MKDs as automatically maintained inverses. This would make an already powerful, but probably underutilised, feature of Jade even more useful and may increase the usage by developers as they start to see more of the benefits of using Interfaces.

Cheers,
BeeJay.

User avatar
ghosttie
Posts: 181
Joined: Sat Aug 15, 2009 1:25 am
Location: Atlanta, GA, USA
Contact:

Re: Attributes on Interfaces ... please!

Postby ghosttie » Fri Oct 03, 2014 2:29 am

If interfaces had properties wouldn't that make them classes? And by allowing inheritance plus interface implementation you'd basically have multiple inheritance...
I have a catapult. Give me all the money or I will fling an enormous rock at your head.

User avatar
BeeJay
Posts: 312
Joined: Tue Jun 30, 2009 2:42 pm
Location: Christchurch, NZ

Re: Attributes on Interfaces ... please!

Postby BeeJay » Fri Oct 03, 2014 10:18 am

Yes and no. You'd still have to map the interface properties to either existing properties on your class or create new properties, so it's not quite the same as multiple inheritance such that you're not inheriting the properties themselves, you can map them to whatever named properties suits that implementation of the interface on that class. :)

Cheers,
BeeJay.

allistar
Posts: 156
Joined: Fri Aug 14, 2009 11:02 am
Location: Mount Maunganui, Tauranga

Re: Attributes on Interfaces ... please!

Postby allistar » Fri Oct 03, 2014 11:03 am

I'd be keen to see interfaces work well with packages and deltas first before they're enhanced. By "work well" I mean that we don't get exceptions in the IDE when an interface method is in a delta or a method that implements an interface is in a delta. Currently it's very difficult to remove a method from an interface if that interface is exported in a package. The only way at the moment is to unpick the interface and it's implementors, remove it from the package, and then remove the method (keeping your fingers crossed that you don't get IDE exceptions because you also use deltas). We have had cases where something as simple as removing a method from an interface takes an entire day of frustration for a developer.

Does anyone else use deltas JADE, and have you experienced the kinds of issues I'm referring to?

User avatar
BeeJay
Posts: 312
Joined: Tue Jun 30, 2009 2:42 pm
Location: Christchurch, NZ

Re: Attributes on Interfaces ... please!

Postby BeeJay » Fri Oct 03, 2014 11:12 am

I've never worked on a project that utilises deltas - mainly because up until 'recently' you couldn't use deltas in thin client IDEs and none of the projects I've worked on have considered using deltas after the feature was made available to thin client IDEs. Actually, I think the particular project you work on is one of the few that actively uses deltas. ;)

I have, however, had some of the fun you refer to when removing methods from an interface used across package boundaries.... although nowhere near the level of grief that you obviously encountered with deltas added into the mix, mine was more just the number of 'catch-22' steps you needed to go through rather than encountering any exceptions in the IDE whilst doing the remove.

Cheers,
BeeJay.


Return to “Feature Discussions”

Who is online

Users browsing this forum: No registered users and 12 guests