1. Object comparison
2. Overall function comparison
Common points:
3.Script edit function comparison
The script edit involves a few items below: Distinguish code properties by fonts, automatic syntax verification, code block collapse, code block indentation hint, auto-completion, function help, and computing result printout. In the following sections, we will write the scripts of the same function to compare the script edit function of these three types of IDE.
Method 3: Local manual search. Programmers can open the local Help from the Help menu, and press Ctrl+F to enter the keyword. The result is as follows:
The formal computing result will usually be output to file or database. Programmers will verify the result in the IDE. In the Perl, the computing result can be printed to the output console:
2. Automatic syntax verification. Python also provides the automatic syntax verification with the same wavy line indication. By pressing CTRL + F1, we can view the hint contents, as shown below:
Unlike Perl, Python does not provide the tab for syntax verification status. However, on the right side, we can still view the error summary clearly. This is similar to Eclipse. For example, if writing two lines of erroneous scripts on purpose, two red short lines will appear on the right, as shown below:
As for the automatic syntax verification, each of Python and Perl has its own merit. In my opinions, Python is more intuitive and convenient.
5. Auto-completion function. As long as the first few letters are typed-in, the IDE will give the candidate words.
If adding a full stop behind the object, the members of object can be listed directly, as shown below:
Hold down CTRL and put the mouse pointer on the function. The help for this function will appear, as shown below:
Like Perl, Python also allows for printing the computing result to the console by scripting, as shown below:
1. esProc also uses different fonts to distinguish code properties, which is as easy-to-use as Perl and Python does. However, in esProc, only the comments, constants, and expressions can be distinguished. The esProc expressions can not be further classified to function name and variable name. What a pity.
2. Automatic syntax verification. esProc does not offer the automatic syntax verification, which is inferior to Perl and Python in this regard. For example, if we write a statement with error in B2 cell intentionally, no hint will appear in IDE, as shown below:
The hint only appears when executing:
3. Code block collapsing. This IDE provides the code block collapse function which is at the same level to Perl and more practical than Python. Since the original algorithm is rather simple, and there is too few codes in IDE, we are unable to see the collapse effect. So, let’s change to a complex syntax to demonstrate it, as shown below:
On the row 4, there is a collapse mark . Once clicked, the FOR statement will collapse, as shown below:
4. Code block indentation hint. esProc puts its script in a grid, and the grid line can be regarded as the natural indentation mark. The code is clear and easy-to-read without having to spare extra effort to lay out or align. The work scope of esProc code can be indicated clearly with the grid indentation. That is more convenient and much easier to read than the bracket adopted in Perl, and more intuitive than the Tab in Python. The indentation error can basically be avoided. Take the multi-level indentation in the below figure for example:
6. Function help. The function help of esProc is similar to Python, which is much more convenient than that of Perl. Take the join function in the A2 cell for example. Simply put the cursor at the function name, and press “Alt+down arrow“ to view the description, return value, parameter, and parameter options for the join function.
7. Print the computing result. It is most comfortable to print the computing result in esProc. esProc is the grid-style script. The code is written in the cell. By clicking the cell, you can view the execution result in this cell, as shown below:
4.Debugging comparison
2.Monitoring variable.
There are many methods for monitoring variables in the Perl. First: View directly in the code zone by placing the mouse pointer to a certain variable in the code zone. IDE will hint the value of this variable directly. Take the @empArray variable in the row 12 for example:
This method is relatively intuitive, but the variable value is not completely displayed, appearing somewhat meaningless in practical use. To view the complete variable value, we need to take the second method. View in the variable list.
The only advantage of this method is that users can have a full view of the variable value. In other aspects, this method are disadvantageous. Take the complicated operations for example. Variables must be expanded to view the value. The variable @empArray as an example must be expanded for three times. For another example, the data monitoring is so inconvenient that users can neither view the row data transversally nor the column data vertically. This is a far cry from the structured data and extremely unfriendly. Take the below figure for example:
In the section below, we will add @sales and @empArray to the Watch zone, as presented below:
3. Temporary expression parsing. In debugging, we are often required to resolve the temporary expression outside the code. For example, view the second record of the variable @empArray, or the second field of the second record. In the watch window, this function is implemented, as shown below:
Similar to Perl, the complete variable value cannot be monitored with this method. However, on clicking on the variable value, the complete variable value will expand in the window, as shown below:
Then, check out the method 2: View in the variable list.
In Python, variable can be viewed by simply expanding it once, which is more convenient than that in Perl, as shown below:
The method 3 can solve the variable interference. The watch function of Python is shown below:
Python provides the convenient temporary expression parsing. For example, view the second record of the variable @empArray, or the second field of the second record.
2. Monitoring variable. The variable monitoring method of esProc is more friendly than that for Perl/Python. Method 1: View in the code zone directly. Click the cell in esProc to view the cell value on the right, and the cell name is just the temporary variable name. For example, click the cell B1 – the temporary variable of B1 equals to the empArray in Python and Perl.
Method 2: View in the variable list. The variables like A1 and B1 are temporary variables, not requiring the definition to make the reference directly. But for the meaningful variable, a name can be defined. For example, the associated computing result in A1 is named as data. Take the below figure for example:
3. Temporary expression parsing. Similarly, esProc supports the temporary expression parsing in the debug mode. For example, to get the first record of B1, we can directly write the expression in B2, or click on the Calculate cell button on the tool bar. The result is shown below:
You can define a variable to display in the variable list. For example, to define the field Name of the first record as name1, just type the below contents in B6: =name1=B1(1).Name. The result is: