官术网_书友最值得收藏!

  • Perl 6 Deep Dive
  • Andrew Shitov
  • 174字
  • 2021-07-03 00:05:49

Using simple built-in data types

Perl 6 comes with a number of various built-in types that cover the common range of things, such as Booleans, integers, and strings, but also offers unusual data types. We will cover them in this section. To demonstrate the built-in types, we will print them to the console using the say function, as we did in the ‘Hello, World!’ example.

The hierarchy is built using two types of items: roles and classes. Roles are drawn in ovals, while classes are rectangle boxes. Roles are similar to interfaces in some programming languages. In this chapter, we won't focus on the details of what is a role or a class. You can learn that in detail in Chapter 8, Object-Oriented Programming. For now, we will assume that you have some basic understanding of object-oriented programming and will be able to understand the hierarchy of the data types.

In the following sections of this chapter, we will go through the main data types that you may use in your practice.

主站蜘蛛池模板: 陵水| 吉隆县| 武陟县| 桑植县| 新蔡县| 磴口县| 汉沽区| 贵州省| 中牟县| 赞皇县| 通江县| 临沂市| 安化县| 五常市| 桃园市| 乐安县| 清新县| 临潭县| 梨树县| 三亚市| 黄平县| 九龙城区| 五常市| 绥化市| 扬州市| 广昌县| 新干县| 慈利县| 呼和浩特市| 镇巴县| 迁西县| 宁晋县| 新晃| 徐水县| 绥德县| 普兰县| 仪陇县| 蕉岭县| 渝中区| 方城县| 涞水县|