Skip navigation

Introductory Programming In Java

HW 1 HW 2 HW 3 HW 4 HW 5 HW 6 HW 7

Homework 7

Functional Programming and Java.next

Part I: Essays on a chosen JVM language: comparison with Java

Part II: Using immutable variables to simplify programming

Due to public choice, the Part I is used as the homework topic.

You will need to conduct a simple research involving modern trends for using the Java platform. You may now by now that Java is not the only language which is used to create programs which are executed by a Java Virtual Machine (JVM). The relatively full list of JVM languages can be found on the List of JVM Languages of Wikipedia page. The top of the list ("high-profiled") contains the following languages:

  • Clojure — a version of Lisp
  • Processing — used by digital media artists
  • Groovy — dynamic scripting language
  • Scala — strongly typed with both OO and Functional programming features
  • JRuby — a JVM implementation of the Ruby language
  • Jython — a JVM implementation of Python

Excluding Processing (it's domain is very specific) and JRuby/Jython (their do not have original features of their own), let's consider the remaining three and add one more into the list:

  • Kotlin — a statically typed hence safer then Groovy but simpler than Scala (it's an open source project lead by Jetbrains, the IntelliJ IDEA maker)

Make a quick review of these four (Clojure, Groovy, Scala and Kotlin) using resources you can find by doing the web searches. Choose one based on your preferences (including, how close its language model is to Java's) and write-up a brief description of that language by using Java as the reference point. Answer the following questions:

  1. How this language is characterised compared to Java (type system: static/dynamic, strongly/weekly typed; main programming paradigm: procedural, OO, functional)?

  2. What are the language advantages compared to Java?

  3. Cite one or two high-profile projects (software products) in which the language is used, and give reasons why the developers had chosen it instead of Java

  4. Does the language have a system of generic types, and if "yes", is it different from Java's?

  5. Does the language have exceptions, and if "yes", how they are different from Java's?

  6. If you like your choice, is it a reasonable alternative to Java as first language to learn programming?

Finally, find (or write it yourself) a snippet of code in the chosen language and in Java side-by-side to illustrate the new language features which makes this comparison favourable.

The size of the essay should be within 650-750 words. Use plain text format for submission.

To submit, make the essay file named JavaNext.txt a part of you Mercurial local repository, and publish it to the central repository (as described in How to submit your work to a Mercurial repository) page by running the command:

	> hg push repo-name

You will get up to 3 points if you do this by 21 May, 2013 (once the publishing repositories become operational).

HW 1 HW 2 HW 3 HW 4 HW 5 HW 6 HW 7

Updated:  Tue 14 May 2013 01:03:20 EST Responsible Officer:   JavaScript must be enabled to display this email address. Page Contact:   Course Webmaster