CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2016

    Post Python and Ruby implementations compared by the error density

    Often people ask questions - which programming language is easier, which is the most popular, which one to start learning and so on. In this article we will compare two languages Python and Ruby; their reference implementations CPython and MRI, to be exact.

    We took the latest versions of the source code from the repositories (Ruby, Python) for the analysis. There werenít many glaring errors in these projects. Most of them are related to the usage of macros, although this code is quite innocent from the point of view of the developer. But at the same time, such suspicious fragments that occurred because of copy paste, comparing SOCKET type with null, undefined behavior, storing values to the variables that are already used or null pointer dereferencing are really worth reviewing.

    Having analyzed all the warnings of general analysis diagnostics and removed all the false positives, we have come to the following conclusion concerning the error density:

    Name:  image4.png
Views: 500
Size:  27.6 KB

    More details about the code fragments where these suspicious code fragments were found:

    Itís worth saying that despite these flaws, the code is still of high quality. We should also take such factors into account as the size of the codebase , or the fact that some fragments are erroneous only from the point of view of C++ language and they donít affect the program in any way. Thatís why this analysis may be rather subjective, because previously we havenít evaluated the error density of these projects. Weíll try to do that in the future, so that we can later compare the result of the checks.

  2. #2
    Join Date
    Jan 2007

    Re: Python and Ruby implementations compared by the error density

    Update. This article contains a few inaccuracies. Please see the updated version here:

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width