first time poster. I've been using Java for a few years now, and have decided to learn D. In Java, you can declare a class with a generic type, and create a new object from that class. Like:
public class foo<T>
{
public foo() { ... }
}
and then simply call foo<String> f = new foo<>();
. I tried to implement the same in D, but I got a compile error like: "class core.collection.RingBuffer.RingBuffer(T) is used as a type". Looking at the tutorials for D, I have found that generic programming is implemented using templates. However, I cannot make heads or tails of the official tutorials/docs. Could someone please explain it to me? Thanks.