Balashankar Gujjabalashankargujja.hashnode.dev·Mar 23, 2024C# GenericsIn C#, the term “generic” refers to a type that is not limited to a specific data type. They allow you to define classes, interfaces, and methods with placeholders for data types. This enables you to create reusable, type-safe code that can work with...Discuss·158 readsC#generics
Harish Selvaharishselva.hashnode.dev·Mar 18, 2024Unveiling the Magic: A Journey into the World of Java GenericsIntroduction: Welcome, fellow adventurers, to a realm where type safety meets flexibility, where the power of abstraction reigns supreme—the realm of Java Generics! In this enchanting journey, we'll embark on a quest to unravel the mysteries of type ...DiscussJava
Kirusekirudev.hashnode.dev·Feb 26, 2024REST EasySome time ago, I got so frustrated with an "API library" I had intended to use for a spare-time project that I just said "screw this" and spent 2 extra weeks writing my own. It was an abstraction layer for a REST API + a WebSockets API. Here, I'll fo...DiscussREST API
Giovanna Moellergiovannamoeller.hashnode.dev·Feb 6, 2024Generics in Swift: Expanding Flexibility and Code ReusabilityIntroduction Generics are a powerful feature in Swift that allow for the creation of flexible, reusable, and type-safe code, avoiding duplication and enhancing clarity. In this article, I will explore the motivation behind using generics, introduce t...DiscussSwift
Yadvir Kauryadvirkaur.hashnode.dev·Feb 5, 2024The Power of Generic Hooks in React Data FetchingHello! Welcome back! In my previous post, we created a custom hook, like 'useUsers', to fetch data from a specific endpoint, say '/users'. But what if we need data from different endpoints like '/posts'? We'd end up writing similar custom hooks, intr...Discuss·37 readsgeneric hooks
becomingiOSbecomingios.com·Feb 4, 2024Swift GenericsSwift generics are a powerful way to write flexible, reusable code that avoids duplication. Understanding generics allows you to craft elegant solutions to complex problems. In this article, I'll cover the basics of generics in Swift and how you can ...DiscussiOS
Jiwon Yujingwangjjang.hashnode.dev·Jan 28, 2024[TypeScript] What is Generics?In the world of TypeScript, generics provide a powerful way to write reusable and flexible code. Generics allow you to create functions, classes, and interfaces that work with a variety of types, providing better type safety and enabling the creation...DiscussTypeScript
Sanjeevisanjeevi.hashnode.dev·Jan 26, 2024Generics and const generics in RustNormally we write a function or any user-defined type for solving a particular task by accepting Concrete type i.e the type is known when we pass it to them. fn sum_i32(i: &[i32]) -> i32 { i.iter().sum() } fn sum_f32(i: &[f32]) -> f32 { i.ite...Discuss·29 readsRust
Dipto Biswasdiptobiswas.hashnode.dev·Jan 25, 2024Generics in RustIntroduction Generics are how we handle multiple data types effectively. It exists in Rust, as well as in many other Programming languages. Example fn compare_values<T>(value1: T, value2: T) -> bool where T: PartialEq, { value1 == value2 } f...DiscussRust
Sumit Mazumdarsumitmazumdar.in·Jan 14, 2024Template in C++Once upon a coding adventure, there was a diligent programmer named Alex. Alex had a magical tool in his C++ toolbox known as "templates." This enchanting concept allowed Alex to weave spells of code that danced seamlessly with different data types. ...Discusscpp