static method

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

static method

Postby ConvertFromOldNGs » Fri Aug 07, 2009 1:08 pm

by Didier >> Tue, 31 Jul 2007 5:00:21 GMT

Hi:
As we know,
JAVA provide static method ,
so we can invoke the method by class and not by object( instance of class ).

This mechanism is very useful for polymorphism when create a new object of the class.

I want to know whether JADE has the same conception( static method ) as JAVA ?

If JADE has the "static method" , how to implement ?
If JADE does not have, it's possible to enhancement this concept in future ?

Didier
2007.7.31

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: static method

Postby ConvertFromOldNGs » Fri Aug 07, 2009 1:08 pm

by dcooper@jade.co.nz >> Tue, 31 Jul 2007 9:45:40 GMT

No - JADE currently does not have static (aka class) methods. However, similar functionality can easily be achieved using patterns like Factory, Singleton and Prototype. JADE also gives you several natural singleton objects (eg: app, global, currentSession) through which you can easily access implementors of these patterns. That said, we do appreciate that static/class methods provide convenient syntax and they have been a candidate feature for recent JADE releases. But we've found that they're not a commonly-requested feature and ultimately other enhancements have taken priority. We're certainly not closed to the idea of static methods though.

Dean.


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 20 guests

cron