Why don't some languages ​​use semicolons and braces?

Interestingly, some languages ​​do not use semicolons and curly braces, although their predecessors had them. Personally, it makes me nervous to write Python code because of this. Semicolons are also missing in GO GO, although lexer uses a rule to automatically enter semicolons when scanning.

Why don't some languages ​​use semicolons and braces?

+3
source share
13 answers

Each programming language must somehow distinguish between the end of an operator, a list of function call parameters, or a block of code from the following.

Some languages ​​use; and {} (C, Java)

( x86)

s- (Lisp, Clojure)

(Python)

, begin... end (Pascal, Delphi)

, . - ; {}, ...

+23

, , , - - . .

+15

, , () - , , .

, # ... , , , ( ). , , .

+11

, . , ( {};, /, ) ; , - .

Python . , , . , , , , , :

, , , , . ~ -, , 1918

, , ...??

+9

: (. ), /, . , Python , . , , :)

- for(i=0;i<=100;i++);, , Python...

+8

" ."  

+6

, ?

, " ", , . :

  • Python Haskell .

  • Clu Lua .

  • ML let -, , .

  • Bourne

  • , . Schemers, Olin Shivers, , , .

, , , , .. , . , - , . ( , , , , , , .)

, , ?

, , , . , , . ?

+6

, , , . , , ? , ... - , . .

, : . , , , / , (, , , ), , , Python, . . , .

+5

, ?

+5

, . begin end , : ", , , , , , - , ...". , , ; , , , , , , : lexer .

+4

{} ( , ), . ++ ,

{
    lua_table tab;
    {
        lua_string str;
    }
}

, Lua- ++ .

+4

, "" .

, ( ) - .

, .

+4

I really don't understand why you are asking. Do you hate writing Python code? Well don't! No one canceled C / C ++, etc.

-2
source

Source: https://habr.com/ru/post/1745771/


All Articles