Reserved Words of Programming languages

28 November 2016


Amount of reserved words per programming language:

As You can see Golang has the minimal amount of reserved words.

C++ keywords: 92 words

alignas (since C++11)    dynamic_cast           reinterpret_cast
alignof (since C++11)    else                   requires (concepts TS)
and                      enum                   return
and_eq                   explicit               short
asm                      export(1)              signed
atomic_cancel (TM TS)    extern(1)              sizeof(1)
atomic_commit (TM TS)    false                  static
atomic_noexcept (TM TS)  float                  static_assert (since C++11)
auto(1)                  for                    static_cast
bitand                   friend                 struct(1)
bitor                    goto                   switch
bool                     if                     synchronized (TM TS)
break                    import (modules TS)    template
case                     inline(1)              this
catch                    int                    thread_local (since C++11)
char                     long                   throw
char16_t (since C++11)   module (modules TS)    true
char32_t (since C++11)   mutable(1)             try
class(1)                 namespace              typedef
compl                    new                    typeid
concept (concepts TS)    noexcept (since C++11) typename
const                    not                    union
constexpr (since C++11)  not_eq                 unsigned
const_cast               nullptr (since C++11)  using(1)
continue                 operator               virtual
decltype (since C++11)   or                     void
default(1)               or_eq                  volatile
delete(1)                private                wchar_t
do                       protected              while
double                   public                 xor
                         register(2)            xor_eq

C keywords

C89: 32 words

auto         goto         
break        if           
case         int          
char         long         
const        register     
continue     return       
default      short        
do           signed       
double       sizeof       
else         static       
enum         struct       
extern       switch       
float        typedef      
for          union        

C99: C89 + 5 words


C11: C99 + 5 words

_Alignas        _Noreturn
_Alignof        _Static_assert
_Atomic         _Thread_local
_Generic        _Noreturn

Python 2: 31 words

and       del       from      not       while
as        elif      global    or        with
assert    else      if        pass      yield
break     except    import    print
class     exec      in        raise
continue  finally   is        return
def       for       lambda    try

Python 3: 33 words

False      class      finally    is         return
None       continue   for        lambda     try
True       def        from       nonlocal   while
and        del        global     not        with
as         elif       if         or         yield
assert     else       import     pass
break      except     in         raise

Ruby: 41 words

__FILE__  and    def       end     in      or      self   unless
__LINE__  begin  defined?  ensure  module  redo    super  until
BEGIN     break  do        false   next    rescue  then   when
END       case   else      for     nil     retry   true   while
alias     class  elsif     if      not     return  undef  yield

Golang: 25 words

break        default      func         interface    select
case         defer        go           map          struct
chan         else         goto         package      switch
const        fallthrough  if           range        type
continue     for          import       return       var

Java: 53 words

abstract    continue   for         new          switch
assert***   default    goto*       package      synchronized
boolean     do         if          private      this
break       double     implements  protected    throw
byte        else       import      public       throws
case        enum****   instanceof  return       transient
catch       extends    int         short        try
char        final      interface   static       void
class       finally    long        strictfp**   volatile
const*      float      native      super        while
false       true       null

*       not used
**      added in 1.2
***     added in 1.4
****    added in 5.0

Scala : 50 words

abstract    case        catch       class       def
do          else        extends     false       final
finally     for         forSome     if          implicit
import      lazy        macro       match       new
null        object      override    package     private
protected   return      sealed      super       this
throw       trait       try         true        type
val         var         while       with        yield
_    :    =    =>    <-    <:    <%     >:    #    @

Scala’s special symbols (_ : = => <- <: <% >: # @) can be excluded and in this case Scala might have only 40 reserverd words.

Who left Ruby Community?

27 November 2016


I’ve been listening The Ruby Rogues podcast for several years. Despite the fact the I’m not a Ruby developer ;-). I’m Ruby user if You will.

So, there was one very interesting episode “#283 - Is Ruby Dying?”.
I’m in Java community and it’s very common to hear that “Java is Dying” ;-). But, it’s very uncommon to hear such statement in Ruby-related podcast.

The most interesting part is:

Charles: Yeah, it’s really interesting too. This goes back, you talking about people coming in,
it comes back at least for me to the people who say that the Ruby community is shrinking.
They see prominent members of the community leaving but at the same time they’re typically doing Ruby and something else.
If they’re going and picking up JavaScript, they’re picking up a front-end framework or something
and occasionally they’ll move off to express or something instead of Rails.

But yeah, is the Ruby community really shrinking? Well, the ticket for Rails Conf and Ruby Conf as far as I can tell are getting harder and harder to get. The conference really isn’t getting bigger or smaller, it’s harder and harder to get because more and more people want to go.

And, I’ve decided to find out who are from prominent members of the community leaving:

Name Info Ruby Community Alt/New Community
Yehuda Katz github, site Merb, Ruby on Rails, Bundler, Thor Rust
Steve Klabnik github, site Ruby on Rails Rust
José Valim github Ruby on Rails Elixir
Dave Thomas github, blog wrote the 1st English Ruby Book in 2000 Elixir
Matt Aimonetti github, site Merb, MacRuby Golang
Mark Bates github, site Ruby Conf Speacker, Screencast Golang
Blake Mizerany github Sinatra Golang
Ron Evans github KidsRuby Ruby, Golang
Katrina Owen github, site Ruby Conf Speacker Golang, Ruby
Bryan Liles github Ruby Conf Speacker Golang
Chad Fowler github, site Ruby Conf orginizer, Ruby Books writer Ruby, Scala, Clojure
David Chelimsky github RSpec Ruby, Clojure
Chris McCord github Ruby on Rails Elixir

It’s very interesting aspect of any community.

Please comment/correct me if this table has incorrect info.

Gradle, Groovy, Kotlin. FTW?

15 June 2016


You’ve probably heard about "Kotlin-based approach to writing Gradle build scripts". A lot of noise was produced based on this announcement and Cédric Champeau tried to explain the real state of Groovy, Gradle and their future relationship.

Just to avoid different speculation about "Gradle is written in Groovy" and now "it will be re-written in Kotlin" here are some numbers:

  • Let’s check the Gradle repo language statistic provided by GitHub

gradle github
  • Gradle root folder has several very important sub-folders:

    • buildSrc - It’s related to Gradle build process

    • config - nothing interesting: condenarc and checkstyle configs

    • design-docs - markdown documentation

    • gradle - Gradle scripts

    • subprojects - Gradle sources. It’s our goal to analyze this folder and understand the language statistics

  • subprojects contains several interesting sub-folders:

    • src/main - actual "gradle" source code

    • src/test, src/integTest and src/testFixtures test source code.

  • Now, count the language stats by cloc tool:

    • src/main:

$ cloc-1.66.exe  --match-d="src/main/" --found=oicloc2.log .
    6052 text files.
Wrote oicloc2.log
    5975 unique files.
    1881 files ignored. v 1.66  T=19.50 s (298.2 files/s, 23192.5 lines/s)
Language                     files          blank        comment           code
Java                          5466          56689         128109         238097
Groovy                         278           3100           5179          14336
JavaScript                       3            160            272           4528
XML                             15              8              0            669
CSS                              6             64             38            354
XSLT                             1             24             31            140
C++                              7              7              0             51
C                                6             22             22             50
Scala                           15             12             39             50
C/C++ Header                     6              9              4             33
HTML                             3              9             17             24
Objective C++                    2              7              0             18
Assembly                         2              1              0             17
JSP                              3              0              0             14
IDL                              1              2              0             14
Objective C                      1              3              0              7
SUM:                          5815          60117         133711         258402

Based on this raw analysis we have 93% Java files and 4.7% Groovy files.

  • Let’s add test ( src/test, src/integTest and src/testFixtures) folders to our statistics:

$ cloc-1.66.exe  --match-d="src/(test|integTest|testFixtures)/" --found=oicloc3.log .
    3867 text files.
Wrote oicloc3.log
    3775 unique files.
    2657 files ignored. v 1.66  T=15.24 s (243.1 files/s, 29213.4 lines/s)
Language                     files          blank        comment           code
Groovy                        3043          65654          47398         291716
Java                           536           5830           7278          23568
XML                             57             19             36           1845
Maven                           22             57             20            571
HTML                            10             18             10            430
Scala                           24             48            122            162
JavaScript                       5             14             13            105
CSS                              1             19              0             91
DTD                              1             54            164             33
XSLT                             2              6              0             20
CoffeeScript                     1              7              8             13
YAML                             1              0              0              7
JSP                              1              0              0              6
SQL                              1              2              1              2
C                                1              0              0              1
SUM:                          3706          71728          55050         318570

As You can see we have 14.5% Java files and 82% Groovy files.


Gradle is Java-based project and it uses Groovy for testing and as a DSL implementation tool, nothing more. The noise around "Groovy vs Kotlin" for DSL implementation inside Gradle sounds strange. Gradle Inc. has just made pragmatic decision. That’s it.

The state of Groovy and other JVM Languages

14 May 2016


Well, I like the Groovy language in general. This language has nice pragmatic applications and all other related “cookie”, but it looks like other languages, Scala especially, are more popular or trendy.

Figure 1. JVM language History (image created by zeroturnaround )

The actual motivation was based on the numbers provided by


Here we have the next numbers projects per language (on Github):

  • Golang — 352K

  • JavaScript — 232K

  • Ruby - 73K

  • Java — 44.5K

  • Python — 35.9K

  • Clojure — 11.2K

  • Scala — 10.1K

  • C — 5.29K

  • Haskell — 4.71K

  • Shell — 3.61K

  • Groovy — 729 (WTF? What? Why?)

I do not understand why Github has so few Groovy based projects. But, let’s double check these numbers.

About Groovy Language ecosystem

If somebody asks you about Groovy the next projects come up to your mind:

Can you name some other “popular” Groovy projects? Well, maybe awesome-groovy can help.


This language rating is very strange because it’s not aligned with other trends. But, it’s better to have it for comparison. Groovy is 17 , Scala — 32. It’s strange result.


GitHut languages

GitHut is an attempt to visualize and explore the complexity of the universe of programming languages used across the repositories hosted on GitHub.


Stackoverflow Developer Survey


More people use JavaScript than use any other programming language. PHP appears to be falling out of favor as Node and Angular emerge.

Most Loved, Dreaded, and Wanted

% of developers who are not developing with the language or tech but have expressed interest in developing with it


Top Paying Tech


Make it rain! Cloud technology pays big bucks. So does tech frequently used in finance. Spark, Scala, Cassandra, and F# top the list of the top paying technologies. (This year’s list looks a lot like last year’s list.)

As you can see Groovy has some issues in popularity. I don’t understand why.

GitHub Repos Analysis

Let’s define some baseline for further analysis based on popular Java repos

  • JUnit 4 — ☆4847, fork 1905

  • JUnit 5— ☆419, fork 77

  • Google Guava— ☆9108, fork 2109

  • Spring Framework —☆ 8824, fork 7286

Groovy Repos

  • Apache Groovy — ☆ 1135, fork 409

  • Netflix/asgard — ☆2091, fork 415 (Asgard is deprecated at Netflix)

  • gradle/gradle — ☆ 3483, fork 1374

  • grails/grails-core- ☆ 1789, fork 805

  • ratpack/ratpack — ☆ 1075, fork 253

  • rundeck/rundeck- ☆1332, fork 307 (Job scheduler and runbook automation)

  • betamaxteam/betamax — ☆ 300, fork 107

Scala Repos

  • scala/scala — ☆6127 , fork 1541

  • apache/spark — ☆ 8511, fork 7906

  • playframework- ☆ 7855, fork 2726

  • akka/akka- ☆5504 , fork1712

  • twitter/finagle-☆4614, fork 870

  • openzipkin/zipkin-☆3537, fork 493

  • scalatra/scalatra-☆1924 , fork 274

JVM Languages

  • Clojure- ☆5310, fork 916

  • Kotlin- ☆5083, fork 543

  • JRuby-☆2519, fork 655

Non-JVM Repos

  • rails/rails- ☆31119, fork 12608

  • expressjs/express- ☆25105 , fork 4731

  • docker/docker- ☆ 31206, fork 8874

  • kubernetes/kubernetes — ☆ 14371, fork 4319

  • github/hub-☆8447 , fork 754


You should make your own conclusion base on this data. I don’t understand why Groovy is not in trend. But numbers show the general picture. Looking forward for your thoughts

Older posts are available in the archive.