Extensions

dwhite

Member
I've been doing some reading on DotNet extensions recently and I was wondering if Progress has something similar?
 
AFAIK "extension" is not a common term for Progress/OpenEdge developers - therefore you should describe what functionality this term describes to get meaningful answers.

Heavy Regards, RealHeavyDude.
 
Basically it's a way to extend functionality of variable types. Speaking from a dotnet point of view. I could write a static method that does a "WordCount" for example, and then based on the way I wrote that method, I could actually use it in the string variable like so:

string myString;
int myCount;

myString = "This is a test";
myCount = myString.WordCount;

I'm guessing because Progress data types are not objects that this won't be something that Progress will ever be able to do, but wanted to check.
 
So you write a function...

myString = "This is a test".
myCount = WordCount(myString).
 
That I know. I was just curious if Progress had the ability to extend functionality of their data types in the way DotNet does.
 
The data types are built into the language and are not extensible as they are not objects in the sense you would talk of an object in .Net or Java. You can think of them like the primitive data types that exist in Java except that they don't come with box objects and auto-boxing.

The OO capabilities where only introduced in the language some few years ago - so there is a way to go. But that does not mean it is not usable and you can not start today. IMHO it is very usable and you can start today to benefit.

Heavy Regards, RealHeavyDude.
 
The built-in data types are not classes, but you can certainly define classes to hold particular data types and either provide those with the desired functionality or create subclasses if there are multiple types of functionality you want on the same base. Indeed, OO inherently expects to use ADTs, abstract data types such as currency, which is more than just an integer or decimal.
 
Back
Top