File: end

package info (click to toggle)
libdb2-ruby 0.5.4-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,352 kB
  • ctags: 2,743
  • sloc: ansic: 11,156; ruby: 6,199; cpp: 6,064; makefile: 86; sh: 31
file content (68 lines) | stat: -rw-r--r-- 2,071 bytes parent folder | download | duplicates (18)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<entry index='e'>
<name>end</name>
<reference>block</reference>
<reference>bug</reference>
<reference>ruby</reference>
<reference>eiffel</reference>
<reference>perl</reference>
<reference>matz</reference>
<content>
    Reserved word to which ((block|Block)) structure is finished.
    According to a certain statistics, 33% of the person,
    who saw ((Ruby)) first sees this, associates Pascal. (...trust it?)
    However, this form which does not pair with '((|begin|))' is
    actually the neighbor of Ada or ((Eiffel)) rather than Pascal.

    ((Ruby)) do not to have offered to {}
    which had been accustomed and familiar with C and ((Perl)).
    It is from the following reasons:

     * Evasion of ambiguous simple / complex sentence problem

       For instance, in C, when you try to add a sentence on

           if (a==b)
              c();

       and do as follows

           if (a==b)
              c();
              d();

       leads a confusing ((bug|Bug)).
       This problem exists also in Pascal.

     * Evasion of dangling 'else' problem

       It is similar to the situation above-mentioned. If you write

           if (a==b)
              if (c==d) foo();
           else bar();

       it becomes annoying.
       To tell the truth, what you really meant is:

           if (a==b) {
              if (c==d) foo();
              else bar();
           }

     * Improvement of readability

       There is a person who thinks that
       closing the ((block|Block)) in the word named 'end' is
       legible to program, though it is a debatable opinion.

     * Problems in sentence structure of '((|begin|))' and '((|case|))'

       Frankly speaking, ((matz)) have tried to use
       the ((variable|Variable)) 'end' several time
       only to have had a terrible time.
       Then, he examined to change to the grammar with {} for a time,
       but every time he abandoned it for the part of grammar
       of '((|begin|))' and '((|case|))' with no beauty.
       To tell the truth, this might be the first reason.
</content>
</entry>