#Generics

2026-02-06

Подход к теме Generics

Изучая Java и подойдя к теме дженериков осознал необходимость вернуться к некоторым азам, постепенно наматывая на ус новые знания. Для этого сформулировал для себя поэтапное рассуждение, которое помогло мне закрепить знания. Надеюсь поможет и еще кому-то. Это не всеобъемлющее представление о дженериках, а лишь некоторые аспекты, которые помогают понять часть проблематики, из-за которой они появились. Итак. Есть такой простейший код:

habr.com/ru/articles/993522/

#дженерики #generics #java

2026-02-04

Novo Nordisk says generic Ozempic, Wegovy will slow sales in Canada
Novo Nordisk says the expiration of its patents for some semaglutide GLP-1 drug treatments in markets like Canada will result in more generics and hurt sales.
#sales #patents #generics #Canada #Consumer #Health
globalnews.ca/news/11652345/no

Novo Nordisk says Canada will hit semaglutide sales as patents expire
Novo Nordisk says the expiration of its patents for some semaglutide GLP-1 drug treatments in markets like Canada will result in more generics and hurt sales.
#sales #patents #generics #Canada #Consumer #Health
globalnews.ca/news/11652345/no

2026-02-04

Novo Nordisk says Canada will hit semaglutide sales as patents expire
Novo Nordisk says the expiration of its patents for some semaglutide GLP-1 drug treatments in markets like Canada will result in more generics and hurt sales.
#sales #patents #generics #Canada #Consumer #Health
globalnews.ca/news/11652345/no

2026-02-03

Кастомные uuid на базе дженерика

Уже более 6 лет я использую кастомные идентификаторы - одна из классных штук, за которые обожаю go. Они незаменимы в описании бизнес-логики - невозможно перепутать порядок идентификаторов. Все вызовы становятся типобезопасными и самодокументируемыми. И писать такой легкочитаемый код очень приятно. Применяю кастомные id очень широко - от парсинга http-запроса до слоя данных. В статье подробно рассказываю: • «как было» раньше (и осталось для кадастровых номеров, например), • переход от кастомизации строк к скрепным uuid.UUID и варианты типизации, • немного запутаемся в важных условиях кастомизации, • скопипастим компактное и готовое решение • и бонусом посмотрим лаконичный синоним в коде.

habr.com/ru/articles/992396/

#Go #uuid #generics

JAVAPROjavapro
2026-01-30

Ever shipped an API and regretted your generic signatures later? Wildcards everywhere. Confusing bounds. Mental overhead. Michel Charpentier breaks down why variance matters—and why still feels heavy here.

Read + apply: javapro.io/2026/01/27/what-i-s

:rss: Qiita - 人気の記事qiita@rss-mstdn.studiofreesia.com
2026-01-03

【C#】ジェネリック型制約における暗黙知を3つの実装パターン(データ表示・入力検証・コマンド)に落とし込んだ例
qiita.com/EndOfData/items/4c76

#qiita #C #WPF #Generics #ジェネリクス #ソフトウェア開発

2025-12-26

:terminal: Writing Type-Safe Generics in C.

The fun part about a programming language like C is that although the language doesn’t directly support many features including object-oriented programming and generics, there’s nothing that’s keeping you from implementing said features in C. This extends to something like type-safe generics in C, as [Raph] demonstrates in a blog post.

raphgl.github.io/blog/generics

#c #type #save #generics #programming #engineer #media #developer #tech #news

⁉️After running through the various ways that generics are also being implemented using methods including basic preprocessor macros and void pointers, the demonstrated method is introduced.⁉️[ImageSource: Raph]

While not necessarily a new one, the advantage with this method is that it is type-safe. Much like C++ templates, these generics are evaluated at compile time, with the preprocessor handling both the type checking and filling in of the right template snippets.

👾While somewhat verbose, it can be condensed into a single header file, doesn’t rely on the void type or pointers and can be deduplicated by the linker, preventing bloat. If generics is what you are looking for in your C project, this might be a conceivable solution.👾
N-gated Hacker Newsngate
2025-12-19

🚀🎉 Breaking news: Yet another self-proclaimed "genius" has added to their obscure language that nobody asked for. Apparently, the world desperately needed "Axe Programming Language" to solve the non-existent problem of having too few programming with generics. 🙄🔧
axe-docs.pages.dev/features/ge

2025-12-08

Wenn du in den letzten Jahren mit Java gearbeitet hast, ist dir vielleicht schon das Schlüsselwort var begegnet. Ja, du hast richtig gelesen: in Java! Denn schon seit Java 10 kannst du damit lokale Variablen deklarieren, ohne ihren Typ explizit anzugeben. Das ist eine praktische Erweiterung - aber

magicmarcy.de/lokale-variablen

#var #Java_10 #Compiler #lokale_Variablen #Typinferenz #Generics #Datentyp #Typ #Java-Syntax

Riverfount :python_logo:riverfount@bolha.us
2025-11-24

🚀 Engenheiros Python: Querem garantir contratos claros e robustos em microserviços? Conheçam Abstract Base Classes (ABCs), que permitem definir contratos rígidos e garantir implementações consistentes no seu código.

No meu artigo "Usando Abstract Base Classes (ABC) em Projetos Reais de Python" mostro um exemplo prático com microserviço de gestão de pedidos, usando ABCs junto com Generics para segurança de tipos e validação antes de armazenar dados.

Leia e veja um exemplo de como elevar a escalabilidade e a manutenibilidade das suas aplicações:
🔗 bolha.blog/riverfount/usando-a

#Python #SoftwareEngineering #Microservices #CleanCode #Typing #ABC #Generics #Dev

Riverfount :python_logo:riverfount@bolha.us
2025-11-21
2025-11-19

wtf

func (rr RR) Fields() iter.Seq[any]

 invalid receiver type RR (pointer or interface type)

yes... have to fucking generate this for each RR type instead... okey, otherwise would have done type-switch, but still "invalid"

#go #dns #generics

2025-11-07

We often reach for interfaces or base classes when we see duplicated code.

But what if you can’t change the types?

In Kotlin & Swift, you can still make the algorithm generic - just teach it how to read and build data.

📝 New post: Generic Algorithms Without Constraints

🔗 paul-samuels.com/blog/2025/11/

#swift #kotlin #generics

Miguel Afonso Caetanoremixtures@tldr.nettime.org
2025-10-12

"A new agreement between the Trump administration and drug manufacturer Pfizer will exempt the giant from proposed pharmaceutical tariffs in exchange for allegedly cutting price for American consumers. The deal has inspired Trump to declare victory over Pfizer, telling CEO Albert Bourla, “I’m surprised you’re agreeing to this.”

However, on closer inspection, the deal appears to be more of a bailout for Pfizer than the American people, with broad promises of sweeping drug savings that, in typical Trump fashion, are unfounded.

Pfizer and Trump’s team-up came as a reported “blindside” to other pharmaceutical companies facing pressure to fall in line and buddy up with the administration before it imposes additional tariffs.

The deal, which sent Pfizer’s stock soaring, is well timed: Pfizer estimates it will lose upward of $18 billion in annual revenue by 2028 as the patents for four of its major pharmaceutical products expire, and generic versions enter the market."

jacobin.com/2025/10/pfizer-bou

#USA #Trump #Pfizer #BigPharma #Patents #Generics

N-gated Hacker Newsngate
2025-09-25

🥳 Oh, joy! Another thrilling episode of "PHP: The Almost Language" where they attempt to introduce like it's some kind of forbidden magic trick. 🪄 Spoiler alert: After a decade of debate, they're still stuck in the land of “almost” – it’s the way. 😏
doganoo.medium.com/generics-in

2025-09-17

Дженерики в Python, простыми словами

Если вы только начинаете изучать Python и слышите слово дженерики, скорее всего в голове сразу каша: «что это вообще такое?». На самом деле дженерики - это очень простая идея. Представьте, что у вас есть коробка. В коробку можно положить игрушки, яблоки, книжки - всё что угодно. Но иногда вы хотите, чтобы в коробке лежали только яблоки. А иногда - только игрушки. И вот тут вам помогают generics .

habr.com/ru/articles/947980/

#python #generics

2025-09-13

Generic'и и protocol'ы в Swift

Привет, Хабр! В прошлых статьях мы говорили про ARC и управление памятью в Swift, но обошли стороной ещё одну сильную сторону языка. Речь идёт о generic'ах и протоколах - именно они делают Swift таким чистым и мощным. В этой статье мы разберёмся, как они работают и почему без них невозможно представить современный Swift.

habr.com/ru/articles/946600/

#ios #generics #swift_generics #swift_protocols

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst