ABAP的直升机视图 [英] Helicopterview of ABAP

查看:99
本文介绍了ABAP的直升机视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对ABAP一无所知,除了它具有面向对象的一面,在我开始详细研究它之前,我希望对其有某种直觉。我知道我在学习时可以找到所有这些内容,但是就像我对初学者所说的那样,我想知道我在处理什么。

I don't know a thing about ABAP, apart from it has an OO side, and I would like to have some kind of helicopterview of it before I start to look at it in detail. I know I can find all of this when studying it , but like I said for starters I like to know what I am dealing with.


  • (总是)已编译吗?

  • Typestem:强类型输入吗?

  • 继承:单个/多个类似接口的结构吗?

  • 集合:它具有除数组之外的集合吗?有通用集合吗?它是否使用列表理解?

  • 数组,返回类型,参数类型,重写中的(con / contra / in)方差如何?

  • 是否有任何异常处理?

  • 通过合同支持进行设计的任何构建吗?

  • 与其他知名语言相比,还有什么值得注意的地方吗?

  • ...

  • Is it (always) compiled?
  • Typestem : Is it strongly typed? Does it use type inference?
  • Inheritance : single / muliple, interface-like structures ?
  • Collections : Has it collections apart from arrays ? Has it generic collections? Does it use List comprehension ?
  • How about (con/contra/in)variance in arrays, returntypes, parametertypes, overriding?
  • Any Exceptionhandling?
  • Any build in design by contract support?
  • Anything remarkable as oposed to other well known languages?
  • ...

基本上所有关于特征的常规信息都将受到欢迎!

Any general info about characteristics basically would be welcome!

推荐答案


(总是)已编译吗?

Is it (always) compiled?

ABAP被编译为某种字节码(出于历史原因称为加载),然后由内核内部的虚拟机执行。您可以将其与Java进行比较,但有一个很大的区别:负载不是独立于机器的,而是针对目标机器类型进行了优化的。这意味着在具有几种不同类型的应用程序服务器的系统环境中,单个程序可能具有多个预编译的负载。并不是说您会看到其中任何一个-整个编译过程都是自动处理的。

ABAP is "compiled" into a sort of byte-code (called "load" for historical reasons) that is then executed by a virtual machine inside the kernel. You can compare this with Java, with one big difference: The load is not machine-independent, but optimized for the target machine type. This means that in a system landscape with several different types of application servers, you might have multiple pre-compiled loads for a single program. Not that you'll ever see any of this - the entire compilation process is handled automatically.


Typestem:类型是否严格?它使用类型推断吗?

Typestem : Is it strongly typed? Does it use type inference?

严格类型化,顶部是通用类型系统。请注意,该语言集成了完整的数据字典-非常方便。

Strongly typed with a system of generic types on top. Note that there's a complete data dictionary that is integrated into the language - very handy.


继承:单个/多个类似接口的结构?

Inheritance : single / multiple, interface-like structures ?

单继承。支持的接口包括复合接口和实现组件重命名(两个接口IF_FOO和IF_BAR都可以定义方法BAZ,而实现这两个接口的类将具有两个方法IF_FOO〜BAZ和IF_BAR〜BAZ)。

Single inheritance. Interfaces are supported, including composite interfaces and implementation component renaming (two interfaces IF_FOO and IF_BAR can both define a method BAZ, and a class implementing both interfaces will then have two methods IF_FOO~BAZ and IF_BAR~BAZ).


Collections:除数组之外,它的集合吗?有通用集合吗?它使用列表理解吗?

Collections : Has it collections apart from arrays? Has it generic collections? Does it use List comprehension?

ABAP中并不存在其他编程语言中称为数组的内容-您会通常使用所谓的内部表代替。考虑类似数据库的结构化内存表。有一些通过不同模块分布的集合类的想法,但是规范的方法是使用内部表-定义所谓的表类型的线,它们表示对实例的引用或包含此类引用的结构。

What you know as "array" in other programming languages does not really exist in ABAP - you'll usually use so-called "internal tables" instead. Think database-like structured in-memory tables. There are some ideas of collection classes spread out through different modules, but the canonical way to do this is to use internal tables - define a so called table type of lines that either represent references to instances or structures that contain such a reference.


数组,返回类型,参数类型,重写中的(con / contra / in)方差如何?

How about (con/contra/in)variance in arrays, returntypes, parametertypes, overriding?

数组:请参见上文。覆盖:在实现接口方法或覆盖超类方法时,不能更改方法签名。至于参数-取决于传输数据(或数据引用)还是对象引用。通常,当您必须显式执行向下转换时,向上转换可能会隐式发生。

Arrays: see above. Overriding: You can not change the method signature when implementing interface method or overriding superclass methods. As for the parameters - that depends on whether you transfer data (or data references) or object references. In general, upcasting may happen implicitly while you have to perform the downcasting explicitly.


是否有任何异常处理?

Any Exceptionhandling?

是。不止一种方法-同样出于历史原因(向后兼容)。支持基于类的异常。

Yes. More than one way - again for the historical reasons (backward compatibility). Class-based exceptions are supported.


是否通过合同支持进行设计中的任何构建?

Any build in design by contract support?

我不知道。


还有什么其他知名语言无法比拟的?

Anything remarkable as oposed to other well known languages?

很多东西。您可能要检查 http://www.volker-wegert.de/en/node/ 17 http://www.volker-wegert.de/en/node / 21 获得公认的偏见概述:-)

Lots of stuff. You might want to check http://www.volker-wegert.de/en/node/17 and http://www.volker-wegert.de/en/node/21 for an admittedly biased overview :-)

这篇关于ABAP的直升机视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆