Slash Boxes

SoylentNews is people

SoylentNews is powered by your submissions, so send in your scoop. Only 17 submissions in the queue.
posted by NCommander on Wednesday April 02 2014, @07:11PM   Printer-friendly
from the I-remember-Applesoft-BASIC dept.

An article was recently published that looks at evaluating First Programming Languages (FPL) the language to use for an introductory course of programming.

An existing issue is that formally assessing a programming language isn't really defined, with a lot of evidence being anecdotal. The proposed evaluation framework looks at technical and environmental feature sets. "The technical feature set covers the language theoretical aspects, whereas, the environmental feature set helps evaluating the external factors." These feature sets are covered in table 2 of the article (link to PDF) and consist of the following:

Technical Features

  • High Level
  • Orthogonality
  • Strongly Typed
  • Enforceability of Good Habits
  • Security
  • Feature Uniformity
  • Less Effort for writing simple programs

Environmental Features

  • Demand in Industry
  • Contemporary Features
  • Easy Transition
  • Readable Syntax
  • Quality Coding
  • User Friendly Integrated Development Environment

The article explains each of these points in details, and gives each of the languages being evaluated a rating based on this explanation, followed by a detailed explanation of how the scores of each rating can be compared this includes allowing an evaluator to weigh certain criteria they deem important against the others. As this is for choosing a language to teach someone to program with, different places will have different reasons and goals, so would want to weight things differently.

As the default weight settings do not conform to the original popularity index of the languages, so there should be a different weighting criterion. However, it is very hard to come up with a generic and correct weighting criterion. Therefore, the scoring function should be customizable and the user should be able to tune the weight of each feature based on her preferences. As an example, consider the fact that Ada holds 3rd position in overall scoring, but is not being considered among highly used FPLs as of now.

NCommander adds: lhsi was kind enough to include a summary of the results. I looked through the paper and it seems like a fairly interesting read.

Using the default weighting, the top five First Programming Languages evaluated are as follows:

  1. Python
  2. Java
  3. Pascal
  4. Ada
  5. Modula-2


  1. Java
  2. Ada
  3. Python
  4. C#
  5. C++


  1. Java
  2. Python
  3. Ada
  4. C#
  5. Modula-2
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 1) by Aiwendil on Wednesday April 02 2014, @10:30PM

    by Aiwendil (531) on Wednesday April 02 2014, @10:30PM (#25215) Journal

    Ada makes sense, a lot of sense actually - in fact it makes so much sense I encourage C(and derivates thereof)-coders to write at least a few hundred lines in it every other year.

    The language is mostly readably by non-coders, every named block must have a named closure, it encourages/enforces good structure, and at the same time it is insanely flexible and it is standardised in how to interface with other languages ( pragma Import; ), and most compilers (including gnat (it is in most linux-dists, and it uses the gcc toolchain)) allows one check if the style conforms to standards (ie, do you have the right indentation or no spaces after a semicolon that isn't at the end of line? no, that either is a warning or an error depending how what flags you passed to the compiler - this is also is one of the reasons why all ada-code looks pretty much the same no matter what coder wrote it).

    Anyhow, as a first language it will be good in that it punishes bad behaviour severly (implicit typecasts - forget it, reading non-initialized variables - nope, only setting a few items in a struct - nope, having case/switch without all options handled - nope, and those are just the first few features I enjoy with ada, having unreachable code - nope).

    However its tedency to punish badly planned projects makes it take away about as much spontanity and joy of coding as protected memory does when exploring how far one can push the machine - so it is a language for projects and reliability rather then quick hacks and "just getting it out the door".

    I do have a hard time thinking of a better language for people to start out in - especially if the code is to be audited, proven, geared towards high reliability, or in case another class is in ASIC design (due to VHDL). It is an industrial language.

    But all in all Ada 83 is horrible and I'd recommend you avoid that, but later Ada-versions (95, 2005, 2012) are nice. :)

  • (Score: 2) by skullz on Thursday April 03 2014, @04:52AM

    by skullz (2532) on Thursday April 03 2014, @04:52AM (#25340)

    I see what you are saying but I must disagree. The constructs in Ada etc are good were designed to handle the mistakes developers make but they aren't suitable for a first language. Pointers, stacks, and understanding WTF a string actually is are important. Why are structs and function pointers so awesome? How is memory allocated? Why are binary trees so cool? These are the kind of things that they need to understand if they are going to actually harness the power of a language such as Ada or Java. They need to really get the why.

    And while Ada may be a good teaching experience it has no practical application. They need some C++ with a lot of Java/C#/Python/etc.

    • (Score: 1) by Aiwendil on Thursday April 03 2014, @10:33AM

      by Aiwendil (531) on Thursday April 03 2014, @10:33AM (#25443) Journal

      Pointers - Ada have them (access types)

      Stacks - Probably best described with a simple poll-based system, like reading non-seekable input (ie, polling the keyboard or stdin/fd0), I have a hard time imagining a computerclass that doesn't do this.

      What a string is - This probably will be explained at the same time that it is explained why ada has fixed, bounbed, and unbounded strings, and also why many compilers has support for c.string in the libraries they ship with. (Also, the Ada RM's section A.4 specifically describes how the strings are implemented - and yes, the RM is heavily used by people using Ada). However the compiler defines its default strings as a simple array of fixed length (null-terminated strings are not the norm in all languages)

      Function pointers is called "access to subprogram" and are explained (with examples) in the RM at section 3.10)

      How memory is allocated is dealt with in section 4.8 (describes "new") and in countless other places (mentioned in section 4.8 and the sections it points to), for an non-typed pointer it is unchecked_allocation (called "unchecked access types" in Ada)

      Binary trees are something that be implemented in any language that has any kind of pointers and is a good excersice to learn them - yes (this argument was not in line with the other ones).

      Structs? You mean record types ;) and yes, the entire RM is littered with them and you quite frankly can't learn Ada (nor understand the RM) without them getting second nature.

      "Function pointers" are probably the epitome of reinventing the wheel. But yes, having the address of a call stored in a variable is useful to write programs whose behaviour changes at runtime.

      However, just doing something simple like implementing a generic menu-system for use in other programs would force one to deal with all of the points above (or for that matter writing a simple interactive text-editor) so it is just a matter how of you set up the course - and it is language-agnostic.

      And no practical application for Ada? Don't tell that to industrial/avionics, banking, nuclear, space-exploration, medical, infratructure or other safety-critical systembuilders ;) ( ary.html [] for a quick list of wellknown Ada-projects ) - as I mentioned before, Ada is an industrial language (it is geared towards reliability, big/changing teams, and big projects)

      But having a mix of multiple languages would be the best, so probably the best setup would be to run multiple courses with all in different languages (there is something oddly appealing with the thought of seeing someone being forced to solve problems in Ada/C/Java, erlang, perl/python, non-macro assembler AND lisp/clisp)

      Also, the whole "first language"-assumption is flawed in that it tends to assume generic computers to start with - take a look at programming for PLCs for a situation where one has to throw out everything one learned about coding and fetch the nearest engineer to get stuff done.