Relative Content

Tag Archive for generics

Need advice on framework design: how to make extending easy

I’m creating a framework/library for a rather specific use-case (data type). It uses diverse spring components, including spring-data. The library has a set of entity classes properly set up and according service and dao layers. The main work or main benefit of the framework lies in the dao and service layer.

Scala as a language for Generic Programming

In the paper “An Extended Comparative Study of Language Support for Generic Programming” by Garcia et al. an interesting comparison of programming languages features for generic programming is given:

Why can’t java generics be in arrays?

Why is it that when I try to make an array of ArrayLists: ArrayList<Integer>[] arr=new ArrayList<Integer>[40]; there is an error and java does not allow this?

Java Generics – how to strike a balance between expressiveness and simplicity

I’m developing some code that utilizes generics, and one of my guiding principles was to make it usable for future scenarios, and not just today’s. However, several coworkers have expressed that I may have traded off readability for the sake of extensibility. I wanted to gather some feedback about possible ways to resolve this.

What problems can be solved using Generics?

I haven’t used Generics in C# for a long while. Every time I think I need to use them I either go in the wrong direction and give up or find that I don’t really need them. I feel that I’m missing out or ignoring a technique which could be useful and powerful.