Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reserved keywords count by programming language?

Is there a ranking or table of the number of reserved keywords in various programming languages?

I do not need to know the keywords per se but how many keywords languages like C, C++, C#, Perl, Python, PHP, Smalltalk, Lisp, and Ruby have.

like image 753
Ray Doyle Avatar asked Feb 12 '11 21:02

Ray Doyle


People also ask

How many are reserved keywords in C language?

Keywords are predefined, reserved words in C language and each of which is associated with specific features. These words help us to use the functionality of C language. They have special meaning to the compilers. There are total 32 keywords in C.

What are the reserved keywords with the programming language?

The ISO 9899 standard for the C programming language uses the term "keyword". In many languages, such as C and similar environments like C++, a keyword is a reserved word which identifies a syntactic form. Words used in control flow constructs, such as if , then , and else are keywords.


1 Answers

Lists of keywords in ...

  • ANSI COBOL 85: 357
  • SystemVerilog: 250 + 73 reserved system functions = 323
  • VHDL 2008: 115 reserved words
  • C#: 79 + 23 contextual = 102
  • F#: 64 + 8 from ocaml + 26 future = 98
  • C++: 82
  • Dart: 54
  • Java: 50 (48 without unused keywords const and goto)
  • PHP: 49
  • Ruby 42
  • JavaScript: 38 reserved words + 8 words reserved in strict mode only
  • Python 3.7: 35
  • C: 32
  • Python 2.7: 31
  • Go: 25
  • Elm : 25
  • Lua: 22
  • CoffeeScript: 19, not necessarily "reserved", plus ~50 to avoid from JS
  • Smalltalk: 6 pseudo-variables
  • iota: 2
like image 80
24 revs, 19 users 31% Avatar answered Oct 07 '22 07:10

24 revs, 19 users 31%