Top "Generic-programming" questions

Generics are a form of parametric polymorphism found in a range of languages, including .NET languages, Java, Swift, and Rust.

Generics/templates in python?

How does python handle generic/template type scenarios? Say I want to create an external file "BinaryTree.py" and have …

python templates generic-programming
How can I check for generic type in Kotlin

I'm trying to test for a generic type in Kotlin. if (value is Map<String, Any>) { ... } But the …

generic-programming kotlin
TypeScript: How to deal with generic types and the keyof operator

I try to write a generic function which assembles update data for database updates. Passed arguments: record to be updated …

typescript generics generic-programming keyof
Template function as a template argument

I've just got confused how to implement something in a generic way in C++. It's a bit convoluted, so let …

c++ templates dry generic-programming
Is there any trait that specifies numeric functionality?

I'd like to use a trait to bound a generic type, like this hypothetical HasSQRT: fn some_generic_function<…

rust numeric generic-programming traits
Tag dispatch versus static methods on partially specialised classes

Suppose I want to write a generic function void f<T>(), which does one thing if T is …

c++ metaprogramming generic-programming partial-specialization
Generic programming in C

I am writing a generic linked list implementation in pure C. struct Node { void *value; struct Node *next; }; struct LinkedList { …

c generics printf void-pointers generic-programming
How do I build gcc with C++ concepts ("concepts lite") support?

The C++ standards committee is working on a TS (Technical Specification) for Concepts extension: "Programming Languages - C++ Extensions for …

c++ g++ generic-programming c++-concepts c++17
'Multipurpose' linked list implementation in pure C

This is not exactly a technical question, since I know C kind of enough to do the things I need …

c linked-list containers generic-programming
DataTemplate.DataType = Collection<Entity>?

Is there a way to create a data template that handles a list of items? I have Contact.Phones (EntityCollection&…

wpf entity-framework datatemplate generic-list generic-programming