Board index » delphi » Why no templates?

Why no templates?

Why hasn't Borland implemented some for pf type-safe generic
programming like C++ or Eiffel? Is it so difficult. As to its
use, I find myself casting all the time to use containers, no doubt it
is useful. Anybody any idea why?

Juan

 

Re:Why no templates?


Quote
jua...@impsat1.com.ar wrote:

> Why hasn't Borland implemented some for pf type-safe generic
> programming like C++ or Eiffel? Is it so difficult. As to its
> use, I find myself casting all the time to use containers, no doubt it
> is useful. Anybody any idea why?

> Juan

Juan,

Probably because Pascal is NOT C++...  And why are you using C/C++
containers instead of the tools that Delphi gives you?  Delphi has a
rich set of tools but insisting on using the C++ model just makes YOUR
job more difficult.

derek

Re:Why no templates?


Quote
jua...@impsat1.com.ar wrote:
> Why hasn't Borland implemented some for pf type-safe generic
> programming like C++ or Eiffel? Is it so difficult.

I also have templates high on my wishlist but I suspect that
templates would force a 2 stage compile which would slow things
down to the same sluggishness as CPPB... Given that choice, I'll
stick to high speed compiles and typecasting - at least its
safe typecasting with RTTI...

Alan G.

Other Threads