The Next Big Language

Paulo Pinto pjmlp at progtools.org
Thu Oct 21 22:42:47 PDT 2010


I can get the same benefict from functional languages+generics, or dynamic 
languages.

"Simen kjaeraas" <simen.kjaras at gmail.com> wrote in message 
news:op.vkxy6xx2vxi10f at biotronic-pc.lan...
> Paulo Pinto <pjmlp at progtools.org> wrote:
>
>> Sorry but I still don't get it.
>>
>> Do you mean that the types that erased and the same code is generated?
>>
>> Then let me say that .Net generics get generated on the fly and JITed for
>> each
>> different type.
>>
>> Eiffel and Modula-3 generics also have specific generated code for each
>> type.
>>
>> The major difference regarding C++ code is that the linkers are smarter 
>> and
>> are
>> able to remove duplicates of the generated code for the same set of type
>> arguments.
>
> The point is, D and C++ templates can do a lot more than simple generics.
> Generics is limited to simple copying and pasting of type names, whereas
> templates can build a DSL parser for you, let you choose whether a
> function should be parallelized, a type thread-safe, etc.
>
>
> -- 
> Simen 




More information about the Digitalmars-d mailing list