- Perl 6 Deep Dive
- Andrew Shitov
- 175字
- 2021-07-03 00:05:46
Comments
In Chapter 1, What is Perl 6?, we've seen two ways of writing programs—by passing it in the -e command-line option or by saving it in a file. Of course, all big programs are stored in files. In this section, we will see how Perl 6 helps the programmer to organize the code better by adding comments.
Comments are parts of the source code, which are ignored by the compiler. Comments are intended to give additional information about the program itself. Good examples of comments are explanations of the algorithms used, or the purpose of variables, or a description of the input arguments of a function.
Perl 6 offers two ways of saving additional human-oriented information in the source code by using comments and the so-called Pod. First, we will examine the comments.
Comments are fragments of source code that a compiler does not consider as direct instructions for execution. In Perl 6, there are three ways of leaving comments:
- One-line comments,
- Multiline comments,
- Embedded comments.
Let's examine them in detail.
- Instant Node Package Manager
- 青少年美育趣味課堂:XMind思維導圖制作
- PLC編程與調試技術(松下系列)
- MongoDB,Express,Angular,and Node.js Fundamentals
- 0 bug:C/C++商用工程之道
- Python編程:從入門到實踐(第3版)
- SpringBoot從零開始學(視頻教學版)
- Yii2 By Example
- Laravel 5.x Cookbook
- Mastering VMware vSphere Storage
- Swift編程實戰:iOS應用開發實例及完整解決方案
- Xamarin Mobile Application Development for Android(Second Edition)
- 精通Django 3 Web開發
- 編寫高質量代碼:改善JavaScript程序的188個建議
- Python實現Web UI自動化測試實戰:Selenium 3/4+unittest/Pytest+GitLab+Jenkins