Un aspecto notable de este cuestionamiento del que ha sido y sigue siendo el principal lenguaje de diálogo con el iSeries, es que fue escrito en una publicación, Ipro Developer, que está enfocada en el iSeries, en la que "RPG programming" es el primer ítem del menú que encabeza la página, y que fue escrita por Mel Beckman, quien, según el pie del mismo artículo, "is the senior technical director for iPro Developer". Y más notable aún, que, habiendo pasado casi un mes, no exista ni un deslinde de responsabilidades de la publicación, ni un descargo del director técnico (senior).
La afirmación de obsolescencia del RPG resulta peor todavía en el marco de los reclamos de la comunidad de empresas y consultoras usuarias del iSeries, que se vió obligada recientemente a publicar manifiestos y sostener su difusión ante la inactividad del propio IBM en su defensa. Resulta incomprensible que un sistema que ha representado y representa un importante volúmen de las ventas y licencias de IBM, adoptado por miles de grandes y medianas empresas de primera línea en todo el mundo, que defiende el buen nombre de la empresa por su fiabilidad, y que no ha dejado de actualizarse nunca, sea torpedeado por quienes viven de su existencia.
Pero, para establecer una defensa en regla del iSeries, nada mejor que lo que Scott Klement responde en su defensa:
Yet, Mel even goes so far as to suggest that C (from 1972) and C++ (from 1983) are more modern languages. Are you kidding me?! Like RPG, I code in C every day, it's a big part of my job. And let me tell you, C is not nearly as modern as RPG. It's not even close. C and C++ can't even do simple string operations without you having to code manual memory allocation, bounds checking, and extra code to make sure that a simple string concatenation doesn't turn into a security hole. Its database access routines are nowhere near as simple or advanced as RPG's. Its date operations are awkward and clumsy by comparison to RPG. Don't get me wrong, I like C, especially for lower-level systems coding. But it's nowhere near as modern as RPG, nor as well suited for writing business logic.
But, maybe Mel doesn't understand that when today's authors refer to RPG, we really mean RPG IV. We don't bother including the "IV" every time we say it, because RPG IV today's RPG, and everyone should already know that!
What Features Are Important In Business Logic?
Before we go throwing around opinions about old, legacy, etc... maybe we should define what is important to us? What are important features for a language that's aimed at people writing business logic?
I've coded in more than 20 programming languages. Some are object-oriented (such as Java, C++, and JavaScript), some are procedural (C, RPG, Pascal, Fortran), and some are a mixture of the two (such as PHP.) But when I sit down and figure out which language is easiest for my business logic, it's invariably RPG.
- Business logic uses numbers heavily. Numbers represent quantities, prices, and weights. These are key to almost every application in the business world. Very few languages today support numbers with true decimal-based arithmetic (as opposed to integer and floating-point which are ubiquitous). Java supports decimals properly, but only by working through complex classes. RPG supports decimal numbers simply and easily, because they are the default numeric data type in RPG.
- Business logic uses databases heavily. Almost every business application is database driven, and database access is deeply integrated into the RPG language. Native record access is simple and powerful. Even more powerful is SQL, which is an order of magnitude simpler to code in RPG than it is in many other languages such as PHP or Java.
- Business logic uses dates frequently. Whether you're checking when a customer's payment is overdue, managing inventory turnover, determining when an order should be shipped, or when an employee was hired, you need to work with dates in a simple and effective manner. Today's RPG does that. Many other languages have APIs or classes for working with dates (this includes Java, PHP, C, C++, etc) but in RPG they are built right into the language, and that makes it simpler.
- Business logic uses a ton of string manipulation. Concatenating, scanning, or substringing character data is something I do every day in every program I write. This is easy in many of the languages that Mel considers modern (PHP, JavaScript, Perl, Python, Ruby), but some of them make string manipulation much harder than it should be (Java, C, C++). Today's RPG, unlike its predecessors, makes string manipulation a snap.
No hay comentarios.:
Publicar un comentario