CSC/ECE 517 Fall 2012/ch1 1w6 pp

From Expertiza_Wiki
Jump to navigation Jump to search

This page is about the mixing static and dynamic Object Oriented code. This page will mention some difficulties when these two types of object orientation are mixed and then we will give on practical example of such in JRuby. JRuby is mixing of Java and Ruby, this page will cover the different types of such mixings and examples of each of them.


Introduction

Difficulties in mixing static and dynamic oo

If the static oo makes use of generics for e.g. Java, then the generic types are erased during compilation for backward compatibility. As a result for a dynamically types language like Ruby, there will be problems with type conversion. For example, if you have a Map<String,String>, it will be seen as a simple Map, and JRuby will not be able to determine the correct types using reflection.

JRuby

Advantages of JRuby

Advantages of JRuby over Ruby

Advantages of JRuby over Java

Examples JRuby

References

Further Reading