Skip to Main Content
IBM Power Ideas Portal


This portal is to open public enhancement requests against IBM Power Systems products, including IBM i. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).


Shape the future of IBM!

We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:

Search existing ideas

Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updates on them if they matter to you. If you can't find what you are looking for,

Post your ideas
  1. Post an idea.

  2. Get feedback from the IBM team and other customers to refine your idea.

  3. Follow the idea through the IBM Ideas process.


Specific links you will want to bookmark for future use

Welcome to the IBM Ideas Portal (https://www.ibm.com/ideas) - Use this site to find out additional information and details about the IBM Ideas process and statuses.

IBM Unified Ideas Portal (https://ideas.ibm.com) - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM.

ideasibm@us.ibm.com - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.

Status Not under consideration
Workspace IBM i
Categories Languages - RPG
Created by Guest
Created on Oct 15, 2018

Provide encapsulation in RPG

Provide encapsulation to RPG so we don't need to mimic it via pointers and get easier to read coding.

Currently I'm writing;

pObject = MyCreate();
MysetValue(pObject: 'attr': 'value');
MydoSomething(pObject);
MyDestroy(pObject);

... which would be easier as...

My.Create();
My.setValue('attr': 'value');
My.doSomething();
My.destroy();

This also relates to having namespaces in RPG as bringing in service programs from external vendors sometimes causes collisions.


Use Case:

Provide encapsulation to RPG so we don't need to mimic it via pointers and get easier to read coding.

Currently I'm writing;

pObject = MyCreate();
MysetValue(pObject: 'attr': 'value');
MydoSomething(pObject);
MyDestroy(pObject);

... which would be easier as...

My.Create();
My.setValue('attr': 'value');
My.doSomething();
My.destroy();

This also relates to having namespaces in RPG as bringing in service programs from external vendors sometimes causes collisions.


Idea priority Urgent
  • Guest
    Reply
    |
    May 22, 2023

    IMHO ObjectOrientation OO and encapsulation is an anti-pattern for business logics that typically work with db integration.

    Because OO is used to build say a paint or 3d program, doesn't mean it is useful in all scenarios.

    It forces a nasty coupiling between data and functions, naming spree, auto induced problems and open a whole set of problems. And used is some way I've seen used, it is just "fashion".

    Much better a functional approach, IMHO, if one needs to evolve the language. Function as a first class citizen, not coupled "inside a type", but to its arguments. Much better for composition and reasoning. I can see the RPG evolve with i.e. MAP / REDUCE over DS arrays for example.



  • Guest
    Reply
    |
    Apr 29, 2020

    IBM does not intend to provide a solution to this request at this time, so it is being closed.

    It is unlikely that IBM will provide the type of object orientation that is described in this RFE.

    However, regarding namespaces, there is another RFE related to namespaces that is more likely to be implemented. The title of the RFE is "Prefix or Qualified Keyword for Exports and/or Prototypes". Please consider voting for that RFE.
    http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=92592

  • Guest
    Reply
    |
    Sep 24, 2019

    The CAAC has reviewed this requirement and recommends that IBM view this as a high priority requirement that is important to be addressed. Adding OO features that are reasonable additions to RPG would help the RPG language align even better with other modern languages.

    Background: The COMMON Americas Advisory Council (CAAC) members have a broad range of experience in working with small and medium-sized IBM i customers. CAAC has a key role in working with IBM i development to help assess the value and impact of individual RFEs on the broader IBM i community, and has therefore reviewed your RFE.

    For more information about CAAC, see www.common.org/caac

    For more details about CAAC's role with RFEs, see http://www.ibmsystemsmag.com/Blogs/i-Can/May-2017/COMMON-Americas-Advisory-Council-%28CAAC%29-and-RFEs/

    Nancy Uthke-Schmucki - CAAC Program Manager

  • Guest
    Reply
    |
    Jan 3, 2019

    IBM has received the requirement and is evaluating it. IBM will provide a response after evaluation is complete.

  • Guest
    Reply
    |
    Dec 3, 2018

    The problem is that C++ isn't a real business friendly language.

    And doing development in C++ would still not solve the problem of using these objects in RPG in an easy way (ie. OO style).

    Besides that I don't need the full OO capabilities, just a subset of them.

  • Guest
    Reply
    |
    Oct 18, 2018

    My personal opinion is that if you need object oriented programming then code C++, make ILE modules of it and integrate it in the rest of your code. Then you could use the power of the ILE environment and program OO.