ABAP直升机(Helicopterview of ABAP [closed])

编程入门 行业动态 更新时间:2024-10-28 03:20:34
ABAP直升机(Helicopterview of ABAP [closed])

我不知道一个关于ABAP的事情,除了它有一个OO方面,我想要有一些直升机的视图,我开始仔细看这个。 我知道在学习的时候可以找到所有这一切,但是像我为初学者所说的,我喜欢知道我正在处理什么。

是(总是)编译? Typestem:它是强类型吗? 它是否使用类型推断? 继承:单/多,界面样结构? 集合:除数组之外还有集合吗? 有通用收藏吗? 它是否使用列表理解? 数组中的(con / contra / in)方差如何,returntypes,参数类型,覆盖? 任何异常处理? 任何建筑设计合同支持? 对其他知名的语言有什么好处吗? ...

任何关于特征的一般信息基本上都是欢迎!

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.

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!

最满意答案

是(总是)编译?

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

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

强大的类型与上面的通用类型的系统。 请注意,有一个完整的数据字典集成到语言中 - 非常方便。

继承:单/多,类接口结构?

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

集合:除数组之外还有集合吗? 有通用收藏吗? 它是否使用列表理解?

在其他编程语言中你知道的“数组”在ABAP中并不存在 - 你通常会使用所谓的“内部表”。 考虑像数据库的结构化内存表。 有一些集合类的想法通过不同的模块展开,但是规范的方法是使用内部表 - 定义一个所谓的表类型的行,表示对包含这种引用的实例或结构的引用。

数组中的(con / contra / in)方差如何,returntypes,参数类型,覆盖?

数组:见上文。 覆盖:实现接口方法或覆盖超类方法时,不能更改方法签名。 对于参数 - 取决于是传输数据(或数据引用)还是对象引用。 一般来说,上传可能会隐含地发生,而你必须明确地执行下演。

任何异常处理?

是。 不止一种方式 - 再次出于历史原因(向后兼容性)。 支持基于类的异常。

任何建筑设计合同支持?

没有我知道。

对其他知名的语言有什么好处吗?

很多东西。 您可能需要查看http://www.volker-wegert.de/en/node/17和http://www.volker-wegert.de/en/node/21对于一个绝对偏见的概述:-)

Is it (always) compiled?

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 : 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 ?

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 : Has it collections apart from arrays? Has it generic collections? Does it use List comprehension?

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.

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?

None that I'm aware of.

Anything remarkable as oposed to other well known languages?

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 :-)

更多推荐

本文发布于:2023-08-07 02:46:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1458293.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:直升机   ABAP   closed   Helicopterview

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!