mastodon.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
The original server operated by the Mastodon gGmbH non-profit

Administered by:

Server stats:

360K
active users

#generics

1 post1 participant0 posts today
Wednesday Links<p>Wednesday Links - Edition 2025-02-19<br><a href="https://dev.to/0xkkocel/wednesday-links-edition-2025-02-19-1a5c" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">dev.to/0xkkocel/wednesday-link</span><span class="invisible">s-edition-2025-02-19-1a5c</span></a><br><a href="https://foojay.social/tags/java" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>java</span></a> <a href="https://foojay.social/tags/jvm" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>jvm</span></a> <a href="https://foojay.social/tags/mcp" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>mcp</span></a> <a href="https://foojay.social/tags/jit" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>jit</span></a> <a href="https://foojay.social/tags/enums" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>enums</span></a> <a href="https://foojay.social/tags/generics" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>generics</span></a> <a href="https://foojay.social/tags/kotlin" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>kotlin</span></a></p>
Chris Engelbert / noctarius<p>Me: I love the possibilities of generics in Typescript.</p><p>Also me: I hate the possibilities of generics in Typescript.</p><p><a href="https://mastodon.online/tags/typescript" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>typescript</span></a> <a href="https://mastodon.online/tags/generics" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>generics</span></a> <a href="https://mastodon.online/tags/coding" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>coding</span></a></p>
Dave Liddament<p>Day 20 of PHP Generics. </p><p>This looks at the extends annotation. We also see how multiple things we've learnt can be used together. </p><p><a href="https://vimeo.com/1052595811" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">vimeo.com/1052595811</span><span class="invisible"></span></a></p><p><a href="https://phpc.social/tags/phpstan" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>phpstan</span></a> <a href="https://phpc.social/tags/php" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>php</span></a> <a href="https://phpc.social/tags/generics" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>generics</span></a></p>
stateful being<p>but at least i got pinned down the syntax for &quot;pass through all the <a href="https://mastodon.social/tags/lifetimes" class="mention hashtag" rel="tag">#<span>lifetimes</span></a> and <a href="https://mastodon.social/tags/generics" class="mention hashtag" rel="tag">#<span>generics</span></a> and just implement me this here <a href="https://mastodon.social/tags/trait" class="mention hashtag" rel="tag">#<span>trait</span></a>&quot;</p>
Habr<p>[Перевод] Дженерики в Go</p><p>Это первая часть статьи, посвященной дженерикам в Go, из четырех. Одна из последних и наиболее интересных фич в Golang — поддержка дженериков. Эта серия туториалов будет посвящена тому, что это такое, какую пользу приносит, когда их стоит использовать и как они меняют процесс написания приложений на Golang. Начнем же!</p><p><a href="https://habr.com/ru/companies/beget/articles/862910/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">habr.com/ru/companies/beget/ar</span><span class="invisible">ticles/862910/</span></a></p><p><a href="https://zhub.link/tags/go" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>go</span></a> <a href="https://zhub.link/tags/generics" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>generics</span></a> <a href="https://zhub.link/tags/%D0%BE%D0%B1%D0%BE%D0%B1%D1%89%D0%B5%D0%BD%D0%B8%D1%8F" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>обобщения</span></a></p>
urmaul<p>This paragraph from "Effective Rust" book made me do "huh". It explains the difference in use cases between associated types and generics.</p><blockquote><p>As a technical aside, it's worth understanding why the <code>Deref</code> traits can't be generic (<code>Deref&lt;Target&gt;</code>) for the destination type. If they were, then it would be possible for some type <code>ConfusedPtr</code> to implement both <code>Deref&lt;TypeA&gt;</code> and <code>Deref&lt;TypeB&gt;</code>, and that would leave the compiler unable to deduce a single unique type for an expression like <code>*x</code>. So instead, the destination type is encoded as the associated type named Target.</p></blockquote><p><a href="https://gts.urmaul.com/tags/rust" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>rust</span></a> <a href="https://gts.urmaul.com/tags/generics" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>generics</span></a></p>
0xThylacine<p>Clever rust. In that last screenshot it shows the maximum value that can be factored with that table of data (last value squared). In previous screnshots it showed as Max::Overflow, because in 32-bits it did. Now that we're in 64-bit territory it's showing the max for the last 32-bit table, near the top of the 64-bit range. Of course the very first entry above 32-bits will overflow 64 when squared - as the lower table shows in the max field. (It gets used a lot and square root calcs are expensive in the main loop - another gain of the 30-at-a-time - do it once for the topmost one only, and use the squared value instead while under overflow conditions.).</p><p><a href="https://infosec.exchange/tags/rust" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>rust</span></a> <a href="https://infosec.exchange/tags/learning" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>learning</span></a> <a href="https://infosec.exchange/tags/generics" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>generics</span></a></p>
ajaxStardust<p>The takeaway? Note the Dr's replies (dates between my outgoing). You are correct. There are none. </p><p>If nothing else, maybe BOOST it?</p><p>This is my attempt to communicate important life changing information to my primary care physician, of the Geisinger Family Health Network, in State College, Pennsylvania, 16803. In JULY 2024.<br>I'm still waiting for his reply. </p><p><a href="https://social.vivaldi.net/tags/Lyrica" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Lyrica</span></a> <a href="https://social.vivaldi.net/tags/Pregabalin" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Pregabalin</span></a> <a href="https://social.vivaldi.net/tags/Gabapentin" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Gabapentin</span></a> <br><a href="https://social.vivaldi.net/tags/Civilrights" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Civilrights</span></a> <a href="https://social.vivaldi.net/tags/CivilProtection" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>CivilProtection</span></a> <a href="https://social.vivaldi.net/tags/medicalmalpractice" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>medicalmalpractice</span></a><br><a href="https://social.vivaldi.net/tags/FBI" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>FBI</span></a> <a href="https://social.vivaldi.net/tags/Fraud" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Fraud</span></a> <a href="https://social.vivaldi.net/tags/Pfizer" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Pfizer</span></a> <a href="https://social.vivaldi.net/tags/generics" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>generics</span></a> <a href="https://social.vivaldi.net/tags/phamaceutical" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>phamaceutical</span></a> <a href="https://social.vivaldi.net/tags/pharmacy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pharmacy</span></a> <a href="https://social.vivaldi.net/tags/braindamage" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>braindamage</span></a></p>
Habr<p>SQLAlchemy 2.0 + Python Generic, или как создать универсальный репозиторий для работы с БД</p><p>Доброго времени суток, товарищи, эта статья, так скажем, продолжение предыдущей статьи об SQLAlchemy 2.0 для новичков , в этой статье мы узнаем что такое Python Generic и как его можно использовать в наших целях при взаимодействии с БД.</p><p><a href="https://habr.com/ru/articles/853326/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">habr.com/ru/articles/853326/</span><span class="invisible"></span></a></p><p><a href="https://zhub.link/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://zhub.link/tags/python3" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python3</span></a> <a href="https://zhub.link/tags/sqlalchemy_20" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>sqlalchemy_20</span></a> <a href="https://zhub.link/tags/sqlalchemy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>sqlalchemy</span></a> <a href="https://zhub.link/tags/generic" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>generic</span></a> <a href="https://zhub.link/tags/generics" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>generics</span></a> <a href="https://zhub.link/tags/%D1%82%D0%B8%D0%BF%D0%B8%D0%B7%D0%B0%D1%86%D0%B8%D1%8F" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>типизация</span></a> <a href="https://zhub.link/tags/%D0%BF%D0%B0%D0%B9%D1%82%D0%BE%D0%BD" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>пайтон</span></a> <a href="https://zhub.link/tags/%D0%B4%D0%B6%D0%B5%D0%BD%D0%B5%D1%80%D0%B8%D0%BA%D0%B8" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>дженерики</span></a></p>
Anthony Accioly<p>"Small" things that I highly appreciate about Kotlin coming from Java - Chapter 1</p><p>Inline functions with reified type parameters:</p><p>𝚒𝚗𝚕𝚒𝚗𝚎 𝚏𝚞𝚗 &lt;𝚛𝚎𝚒𝚏𝚒𝚎𝚍 𝚃&gt; 𝚍𝚘𝚂𝚘𝚖𝚎𝚝𝚑𝚒𝚗𝚐(𝚟𝚊𝚕𝚞𝚎: 𝚃)</p><p><a href="https://kotlinlang.org/docs/inline-functions.html#reified-type-parameters" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">kotlinlang.org/docs/inline-fun</span><span class="invisible">ctions.html#reified-type-parameters</span></a></p><p>No more passing classes as parameters. No more super type tokens. It just works.</p><p><a href="https://accioly.social/tags/Kotlin" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Kotlin</span></a> <a href="https://accioly.social/tags/Java" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Java</span></a> <a href="https://accioly.social/tags/JVM" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>JVM</span></a> <a href="https://accioly.social/tags/Generics" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Generics</span></a> <a href="https://accioly.social/tags/TypeErasure" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>TypeErasure</span></a> <a href="https://accioly.social/tags/Reification" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Reification</span></a> <a href="https://accioly.social/tags/SoftwareDevelopment" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SoftwareDevelopment</span></a></p>
The Last Psion | Alex<p>It's getting late and I should go to bed, but I wanted to play with <a href="https://bitbang.social/tags/ctran" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ctran</span></a>.</p><p>I thought I'd see how much faster it is to convert my `array of TToken` to a `TList&lt;TToken&gt;`.</p><p>Turns out, twice as fast!</p><p>Basically, when you concat() an array, the entire array is copied every time. With a TList.Add(), it just adds a pointer to the end.</p><p>The DOS executable is slightly larger (438KB vs 446KB), but the it's worth it for better efficiency and code readability.</p><p><a href="https://bitbang.social/tags/FreePascal" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>FreePascal</span></a> <a href="https://bitbang.social/tags/ObjectPascal" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ObjectPascal</span></a> <a href="https://bitbang.social/tags/Pascal" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Pascal</span></a> <a href="https://bitbang.social/tags/generics" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>generics</span></a></p>
stateful being<p>not even kidding about the <a href="https://mastodon.social/tags/10years" class="mention hashtag" rel="tag">#<span>10years</span></a> </p><p><a href="https://github.com/rust-lang/rust/issues/19032" target="_blank" rel="nofollow noopener" translate="no"><span class="invisible">https://</span><span class="ellipsis">github.com/rust-lang/rust/issu</span><span class="invisible">es/19032</span></a> dates from 2014</p><p>as do my intentions to write this program, come to think of it</p><p><a href="https://mastodon.social/tags/rust" class="mention hashtag" rel="tag">#<span>rust</span></a> <a href="https://mastodon.social/tags/static" class="mention hashtag" rel="tag">#<span>static</span></a> <a href="https://mastodon.social/tags/typing" class="mention hashtag" rel="tag">#<span>typing</span></a> <a href="https://mastodon.social/tags/generics" class="mention hashtag" rel="tag">#<span>generics</span></a> <a href="https://mastodon.social/tags/wtf" class="mention hashtag" rel="tag">#<span>wtf</span></a> <a href="https://mastodon.social/tags/srsly" class="mention hashtag" rel="tag">#<span>srsly</span></a></p>
drmorr<p>I really love this flowchart: how do you make generic types work in _your_ language?</p><p><a href="https://thume.ca/assets/postassets/generics/flowchart.pdf" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">thume.ca/assets/postassets/gen</span><span class="invisible">erics/flowchart.pdf</span></a></p><p>HT <span class="h-card" translate="no"><a href="https://recurse.social/@lindsey" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>lindsey</span></a></span> </p><p><a href="https://hachyderm.io/tags/programming" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>programming</span></a> <a href="https://hachyderm.io/tags/generics" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>generics</span></a> <a href="https://hachyderm.io/tags/types" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>types</span></a></p>
EURACTIV Health<p>Netherlands should raise generics prices to combat drug shortages, says Dutch bank [Advocacy Lab Content] <a href="https://www.euractiv.com/section/health-consumers/news/netherlands-should-raise-generics-prices-to-combat-drug-shortages-says-dutch-bank/?utm_source=dlvr.it&amp;utm_medium=mastodon" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">euractiv.com/section/health-co</span><span class="invisible">nsumers/news/netherlands-should-raise-generics-prices-to-combat-drug-shortages-says-dutch-bank/?utm_source=dlvr.it&amp;utm_medium=mastodon</span></a> <a href="https://eupolicy.social/tags/EUPharmaPackage" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>EUPharmaPackage</span></a> <a href="https://eupolicy.social/tags/generics" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>generics</span></a> <a href="https://eupolicy.social/tags/MedicinesPricing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>MedicinesPricing</span></a> <a href="https://eupolicy.social/tags/Netherlands" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Netherlands</span></a></p>
WetHat💦<p>Generic Constraints - A Gentle Introduction to Generics in Typescript</p><p>Examples of how to use the `extends` keyword to constrain types and a discussion of more advanced use cases, such as constraining a type variable by another type variable.</p><p><a href="https://fosstodon.org/tags/TypeScript" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>TypeScript</span></a> <a href="https://fosstodon.org/tags/Generics" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Generics</span></a> <a href="https://fosstodon.org/tags/TypeSafety" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>TypeSafety</span></a> <a href="https://fosstodon.org/tags/Programming" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Programming</span></a><br> <br><a href="https://www.allthingstypescript.dev/p/generic-constraints-a-gentle-introduction" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">allthingstypescript.dev/p/gene</span><span class="invisible">ric-constraints-a-gentle-introduction</span></a></p>
silvercoder70<p>A Quick Guide to using Generics in Free Pascal</p><p>Learn how to use generics to create reusable and type-safe code - this video provides a clear and concise introduction to generics in Free Pascal that you can use out of the box. Let me know if you want to see more videos on generics... </p><p><a href="https://youtu.be/je6Wx4CI7ac" rel="nofollow noopener" target="_blank"><span class="invisible">https://</span><span class="">youtu.be/je6Wx4CI7ac</span><span class="invisible"></span></a></p><p>Links:<br><a href="https://wiki.freepascal.org/Generics" rel="nofollow noopener" target="_blank"><span class="invisible">https://</span><span class="">wiki.freepascal.org/Generics</span><span class="invisible"></span></a><br><a href="https://github.com/silvercoder70/code-examples/" rel="nofollow noopener" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/silvercoder70/code-</span><span class="invisible">examples/</span></a><br>example6.lpr + uPerson.pas</p><p><a href="https://bitbang.social/tags/generics" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>generics</span></a> <a href="https://bitbang.social/tags/freepascal" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>freepascal</span></a> <a href="https://bitbang.social/tags/programming" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>programming</span></a> <a href="https://bitbang.social/tags/coding" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>coding</span></a> <a href="https://bitbang.social/tags/tutorial" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>tutorial</span></a> <a href="https://bitbang.social/tags/beginner" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>beginner</span></a> <a href="https://bitbang.social/tags/softwaredevelopment" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>softwaredevelopment</span></a> <a href="https://bitbang.social/tags/developers" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>developers</span></a></p>
WetHat💦<p>Using Generics In TypeScript: A Practical Guide | ClarityDev blog</p><p>About the use of generics in TypeScript, to create flexible, reusable, and type-safe code. The article covers basic concepts, practical applications, and advanced techniques, emphasizing best practices and common pitfalls to avoid.</p><p><a href="https://fosstodon.org/tags/TypeScript" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>TypeScript</span></a> <a href="https://fosstodon.org/tags/Generics" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Generics</span></a> <a href="https://fosstodon.org/tags/Programming" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Programming</span></a> <a href="https://fosstodon.org/tags/BestPractices" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>BestPractices</span></a> </p><p><a href="https://claritydev.net/blog/typescript-generics-guide" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">claritydev.net/blog/typescript</span><span class="invisible">-generics-guide</span></a></p>
Daniël Franke 🏳️‍🌈<p>It's hard to imagine that I could ever write <a href="https://berlin.social/tags/Golang" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Golang</span></a> without <a href="https://berlin.social/tags/generics" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>generics</span></a>.</p>
Jaanus Kase<p><a href="https://iosdev.space/tags/Swift" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Swift</span></a> <a href="https://iosdev.space/tags/Generics" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Generics</span></a></p><p>Hello my beautiful kind helpful Swift people</p><p>I have basic question about generics, “some”, “any” and such. Maybe you can nudge me in the right direction?</p><p>How would you fix this code so it compiles? Can it be done even?</p><p>What it does: trying to archive and unarchive some Codable+Sendable values, without caring about the exact type</p><p>It can assume that there are no mixed types, i.e it always works with [ResultRecord] or [OtherTypeConformingToResultRecordType], but no mixing</p>
Habr<p>Новый компилятор K2 в Kotlin. Часть 2. Гайд по миграции</p><p>В этой статье эксперт сообщества Spring АйО – Михаил Поливаха рассмотрит процесс миграции с компилятора Kotlin старой версии на новый компилятор K2. В предыдущей статье Михаил рассмотрел компилятор K2, а здесь сфокусировался только на процедуре миграции.</p><p><a href="https://habr.com/ru/companies/spring_aio/articles/826660/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">habr.com/ru/companies/spring_a</span><span class="invisible">io/articles/826660/</span></a></p><p><a href="https://zhub.link/tags/kotlin" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>kotlin</span></a> <a href="https://zhub.link/tags/k2" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>k2</span></a> <a href="https://zhub.link/tags/compiler" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>compiler</span></a> <a href="https://zhub.link/tags/java" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>java</span></a> <a href="https://zhub.link/tags/generics" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>generics</span></a></p>