Hello Jon,

you are right that one could code in Assembler consistent to the 
OO-programming style. But the big difference is, that in OO Languages the 
compiler is able to check all the things and understands what an object 
is. This is not the case in HLASM. So in the end Assembler is what is 
closest to the machine and by definition (as Java e.g. is translated to 
machine code as well) it can be used as OO, but so can everything be 
expressed in letters and you can look like the english language, but 
english consists of rules that are enforced (in this case by the compiler) 
and so HLASM is not an OO Language, even if you can do everything an OO 
Language can do with it. 

Just imagine, the compiler will know at compile time, if it is possible 
that the object you hand over to a method is not correctly typed, in HLASM 
you would notice that at runtime. In Java e.g. it is not even possible to 
get around that restriction. If you generally look at the development of 
languages, it is so that one tries to get more and more runtime issues 
into a compiler issue.

So you are maybe right with the requirements that you can fulfill, but 
these are not checked, neither enforced and as such not relevant to the 
definition. 

Cheers,
        Tobias

Mit freundlichen Grüßen / Kind regards

Tobias Leicher

Senior IT Specialist for CICS and zAPI
zChampion for Modernization
IBM Software Group Technical Sales

IBM Mainframe Assembler List <ASSEMBLER-LIST@LISTSERV.UGA.EDU> wrote on 
16/02/2018 06:18:57:

> From: Jon Perryman <jperr...@pacbell.net>
> To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
> Date: 16/02/2018 06:21
> Subject: Re: Solution OOP in HLASM
> Sent by: IBM Mainframe Assembler List <ASSEMBLER-LIST@LISTSERV.UGA.EDU>
> 
> Ze'ev and Richard, These are certainly good examples of using OOP in
> HLASM but they are a little difficult to explain how they relate to 
> the tenets of OOP. 
> 
> Remember that it's the language that supports OOP in a way it 
> chooses to support it. E.g. methods in C++ are usually functions.
> 
> As a programmer using OOP, you are not required to use all OOP 
> tenets in your program. Runtime is polymorphism but we have objects 
> that do not morph (e.g. strings). I think the only requirements are 
> object, methods and encapsulation.
> 
> Your help is greatly appreciated.
> 
> 
> Thanks, Jon.
> 
> > Ze'ev wrote: 
> 
> 
> Jon, You could create objects in HLASM, as the other gentleman 
> demonstrated with a real life example of a session manager.  If we 
> define objects as some entity that could be probed in runtime, then 
> by all means you could do that in HLASM. 
> 

Reply via email to