Article
Robert Cemper · Mar 8 2m read

ePython - mixed or pure ?

You may have seen my series of articles on GlobalToJSON closing with Embedded Python.
And to me, Embedded means inside a Class and not PEX or other external variants.
The first variants showed that ePy is not an ultimate requirement. ISOS/COS may do it as well.
Here I try to position ePy inside IRIS.

I'll start with ePy pure.

Based on my previous positive experience with  AoC2021-rcc  and other excellent examples
this looked like a fast and simple exercise. And of course, calculations and communications
at Object Level (Classes) or using SQL work perfectly.  
This is not a big surprise since Objects and SQL are standards in Python.

But Globals and $List() structures are unique to IRIS (and Caché).
There is the access module iris.grep that covers some basic access. 
Besides some required improvements its use is not really intuitive and requires some exercising.
Also, no surprise as this is a different data storing culture. 
You might compare it to a different character set that has no Accents, Trema, Cedilla, or Tilde.
More drastic: 7bit_ASCII vs. UTF-8 

The experience with ePy mixed is much more motivating.
The whole organization is split into the components where the language fits best.
A few ClassMethods in ISOS/COS  do what they are best at:
- scanning, retrieving and writing globals.
- composing and decomposing $LIST() structures.

My recommendation to you: 
Let every language do what it is best at [sounds a bit like LUKE 20:25]
My examples have shown that solutions are possible in the 2 extreme pure versions.
But the most attractive to me is the mixed one accepting the natural limits.

Or would you consider writing a disk or network driver in Python?
   
 

 

6
0 203
Discussion (1)0
Log in or sign up to continue