skysight-inc/HackerNews huggingface dataset:
This can be said for any programming language and any community: there will always be bad code written by someone.

Generic data structures are provided in many programming languages and there are many people that are very experienced in writing some of these, so being able to reuse, it's precious.

In general the lack of generic price surfaces when you write libraries, not applicative code. But libraries are a big portion of a codebase.
Optimizing for people that are new to a codebase seems like a mistake to me: onboarding costs are relatively minimal and finite (per developer) whereas maintenance costs have no fixed bound: if generics let you exclude invalid states by design (and they do: this is one of the biggest advantages of parametric polymorphism vs. interfaces), they will be useful for keeping maintenance costs under control.
Yes, count for optimum cost per transistor. So perhaps GP's statement was incomplete but not wrong.
They are complex. I’m guessing you haven’t thought about them much beyond the trivial use cases.
Ok, that's a fair point, although the monopoly issue is still there.
Yeah, that's why Kubernetes had to develop code generators. So focused.
Okay relax. that's being dramatic.

My cute cat mask does not give me the psychological conditioning of a person with a permanently disfigured face.
C++ also went a long time without generics, and even when support started to appear it was a separate code generation step, requiring even more time before we saw first-class compiler support.

Powerful, though.
Same here. But I think it's more laziness than 'too smart.'

I like to liken it to house construction. Imagine if a number of people demanded that natural gas and water be combined. Why do I have to make two separate pipes? They even look the same!
If people would stick to common generic data structures (like a map/list that can handle any datatype), i'd be fine with abstractions.

But some people have a tendency to play code golf with their codebases.

I have, for example, encountered a "generic data structure" that looked like a normal linked list on the surface. BUT, it actually sorted the largest three items in the first 3 cells and the average in the 4th.

That was multiple days of work wasted because someone decided to be cute with their data structures. And that wasn't even the only one of such "generic" monstrosities in the code.
In my experience, the only side effect I've noticed is mildly decreased libido. But the decrease wasn't too significant.

I would say there's probably some truth to your observation. I don't partake in DMT, so I can't speak to that part. But it's true that prozac will probably make you less... prone to intensity.

I prefer it. It's nice to have control over my mental state and behaviors. Previously, it was uncontrollable suicidal ideation, which was neither fun nor productive.

At this point it's been so many years since I've had those thoughts that I honestly can't remember what it was like. All I remember is that I was miserable in the worst way. I thought I was a total wuss, too, and that there was something wrong with me for thinking those thoughts.

Turns out, I was going through life with the equivalent of a broken leg, and not bothering to treat it. So when you say that you'd rather be depressed, just know that for those broken few who Prozac helps, it's a bit like saying you'd rather have a broken leg as long as you can have a good DMT experience.

Perhaps some would make that trade, but personally I felt happy with my outcome. But it's true that for others, Prozac may not be the best way forward. It's why it's important to proceed under the care and supervision of a doctor that actually cares about your long-term well-being. (Ideally a therapist. I've thought about that other parallel comment, and they were right; if you're not having luck with doctors, go the therapist route. It's what ended up saving me.)
Availability of 1/2 or 3/4 time positions, with commensurate reduction in compensation.

A close second would be a single-occupancy office with a door that closes.
The title here is misleading. The trees in question are in Washington, but the credits are sold in California. From the link: "The Colville IFM project represents over 14M tons of carbon offsets, or ~6% of all credits in the CA compliance market."
I’m guessing you like Haskell and similar languages, because that’s the natural conclusion to your line of reasoning.

I don’t agree with you, but I could be wrong. There are plenty of languages that are aligned with your point of view. I like go because it was going a different direction, and I hope that doesn’t change. You can use Haskell, scala, typescript, etc to get what you are looking for.
I agree with you strongly. No generics please. It is already hard enough to try to steer a group of developers towards a shared vision without giving them the ability to show off how "smart" they are.

Abstractions in libraries? Ok maybe.

In the higher level code that the vast majority of programmers actually write? No. Thank. You.

Besides, interfaces cover the majority of generic problems on the ground.
Or Scheme Shell - https://scsh.net/about/about.html
I’ll agree with that sentiment. But I think a lot of times at least in certain towns in Massachusetts when certain bad mosquito diseases show up (eee) they start spraying and some towns cancel outdoor activities at dusk.

https://en.m.wikipedia.org/wiki/Eastern_equine_encephalitis

I’m not sure how many non biting mosquitos species are here though but I suspect their control methods are pretty broad. I suspect if they weren’t biting us we wouldn’t notice them.

Mosquito genetics is increasing so generic targeting seems possible. Between that and vaccines..
Oh right because we had the nonbinary choice of voting on Prop B2 and Prop B3 and they all had track changes on /s

Ya’ll kill me
Nobody needs to do that, but it would be nice to have sorted collections without dynamic casting or rewriting half of leetcode in every project.
Are they concerned with the delta variant itself, or the government response to it?
Boating accident.
Back when generics were introduced to Java I felt the same thing. I had been doing Java for years at that time. I had also been working for Sun, so of course I was exposed to it.

I was very negative towards generics and had similar arguments as you. It didn't take long before I changed my mind. I'd never want to write Java without generics again.

I'm not saying you're going to have the same experience, but I would suggest you give it a try before dismissing its value.
OpenAI made algorithm “Codex” to convert written command into code
so as an example, I've used priority queues a lot. you need them for Dijkstra.. apparently golang has a heap package which lets you push and pop `interface{}`. sure you can cast, and I guess people have to, but why couldn't Go just call `interface{}` object or any? the awkwardness of the convention suggests an unwillingness to accept failure.
So the situation is: there is some url you open (with a normal get request. Typically but not neccesarily from an email), then that url does the non-idempotent POST request without any futher user interaction.

A malicious page that knows the url used in the email could open the url from the email in a popup. The js will execute in the popup, and do the POST request. It doesn't matter how much csrf protection you have on the POST step, if anyone can trigger it with no user interaction just by opening some page with a GET request.
There's an alternate Wikidata query engine available here: https://qlever.cs.uni-freiburg.de/wikidata (from https://github.com/ad-freiburg/QLever)

Currently it doesn't support some SPARQL features, but I've found it to generally be quite a bit faster for most queries.
> Rudra was ran on the entirety of crates.io state as of July 4th, 2020 as well as the Rust standard library from nightly-2020-08-26. It managed to find 264 new memory safety issues across the Rust ecosystem which resulted in 76 CVEs.

Great work.
Inductive inference from empirical observation? Abductive inference "to the best explanation" to try and explain some apparent anomaly?
Well there is a valid point of abuse in abstractions. The ruby world is a disaster because of the power provided combined with people reaching out to all sorts of abstractions the entire time for purely experimental reason.

It's true that applicative code shouldn't need generics in probably more than 90% of the times, however the lack of it affects library authors quite heavily
I'm well aware when they are useful, I've been using them in languages for the past 10 years. By the same token though, leaving type parameters out of the language has had far reaching implications outside of this "narrow" situation (I'll put forth that implementing a data structure isn't a narrow situation). Error handling and the lack of sum types also seem particularly egregious and are heavily influenced by the lack of generic types.

> Having said that, I honestly don’t know if generics are a net positive or not. What I can say is that go is one of the few languages where I can jump into an arbitrary go code base and make sense of it relatively easily. Risking that is a scary proposition for me.

I don't see how type params would make this harder, I daresay I can think of a lot of instances it's much easier. The caveat is that you simply don't understand them, in which case it's a good thing to learn as many languages do have them.

In any case all these arguments are well trodden so I'm probably wasting my breath re-hashing here.
Agreed, but that is not what is on offer at the moment. Services want all of the control without any of the obligation or liabilities.
> if you're writing a web application for example, maybe you don't really need generics much

All our microservices return a { result: ... } or a { result: ..., nextPageToken }

We would definitely benefit from generic SingleResult<T> and PagedResult<T>.

Instead, you copy-paste the same definitions over, and over, and over, and over again for every call.
Or use Option or Result, so your error handling is small and forcibly correct.
You sound like, for you personally, generics are like a poison atmosphere. You simply can't live in that environment.

Why? Why so negative?

I work in C++. Generics exist there. I don't use them except for some STL containers. I just... don't use them. I don't have problems where I need them. How does it hurt me if they exist?

You may say that someone else will use them, and make your code more unreadable. They may, but... if they really help the code base, use them. If they don't and someone uses them anyway, teach them some taste and discernment. If they can't learn, then you've got worse problems than a language that has generics.

If it's borderline, but against your personal taste, then yeah, you're kind of out of luck. On the other hand, personal taste changes over time, often from experiencing new things. You could try it for a while, and see how it goes...
I’ve been coding for decades. I’ve used all the fancy functional languages, written production code at scale with complex type systems, etc. my experience, they don’t add a lot of value compared to the costs. In my old age I’ve grown to prefer go for it’s simplicity. I hope we don’t lose it, and you all have the option of using the myriad languages that already do what you are looking for.
They don't need to boycott it - financial regulators can and have come down on banks and payment processors for allowing 'morally dubious businesses' [https://en.wikipedia.org/wiki/Operation_Choke_Point] such as payday lenders, firearms related companies, porn producers, and many more. There is a long history of this type of thing happening, and no one wants to get near an industry where their underlying ability to bank (and therefore interact with the financial system at all) can be yanked with a phone call.
Can’t future citizens pass another proposition with 51% voters approving it to modify Prop 22?
Thanks for your experience, really. Here's hoping.
Or if you're in management: "Forrester recommended doing it this way" or "Gartner recommends adopting this", etc.
So funny to watch people on TV showing how brave women in Afghanistan are while wearing a hijab. Even the TV anchors wear them even though they aren't Muslim. I'm like... Where are the brave women who don't hide themselves?
Interesting social experiment that feels like it has the unethical potential to super-charge pump and dump schemes by lending credence to social media trading ideas and aggregating the information in one place. Inexperienced investors/traders browsing this website might get the impression that it's indeed profitable to be "part of the pump".

Perhaps consider going further back in time, before GME. GME-like events have occurred, but to a smaller extent, prior to GME.

Perhaps consider including posts of people who lost money buying at the top. Few posts are of this nature, but they occur when previously popular tickers dip.

Perhaps include past trader performance. Having been on r/WSB years prior to GME, I've noticed that the _active_ community tends to be made of newly joined users. r/WSB has a huge subscriber base (reddit accounts who have "joined" the subreddit) but far fewer daily active users. Pulled these numbers in the past in an attempt to see if mentions of a stock ticker could fortell a stock's rise (effectively a forward indicator of a pump). Unfortunately, mentions lag the movement. Mentions also lag the eventual rapid dip (so you can't rely on the dip in the mentioned popularity of the stock to sell prior to the dip).
There are just things you can’t do without having generics in your language. User-defined collections, for one. Statically typed higher order functions, for another. To paraphrase (I believe) Bob Harper, you either have a statically typed language with generics, or you have a dynamically typed language. That’s the result of not having generics. Code that needs them becomes more dangerous and error-prone.
100% of them had the chance. If they didn’t read it and voted on it anyway, they should have to live with the consequences.
Sure, that's true, and it's fine. There are people who find s-expressions both liberating and clarifying, and others who get lost in a sea of parentheses. And there are problems that are especially amenable to s-expressions, or generics, or fine-grained control of memory allocation, or interwoven code and markup, object hierarchies, and those problems sort of "ask" for particular languages. But for the most part, this stuff is subjective.
The underlying mentality behind [https://en.wikipedia.org/wiki/Operation_Choke_Point] is why.
Don't hold your breath...
How about extending this feature to automatically add in the required licenses for the sources of Copilot-generated code?
No, Go doesn't have discriminated/tagged unions or valued-enumerations or whatever you want to call them, but generics let you hack them in without much trouble. Personally I'd take ADTs over generics any day, but it's not a dichotomy maybe we'll still get them some day.

https://github.com/golang/go/issues/19412
I’ve been using them for the past 30 years and have come to a different conclusion. You have plenty of languages that do what you want. I hope go doesn’t lose what made it different
Government employees have a habit of doing that.
Are generics really considered as "esoteric comp sci topics"?
You can totally do fine without generics depending what you do. It mostly affects code that supposed to be reusable, especially libraries.
> There will very obviously not be any kind of Mars "colony" in our lifetimes

Define "Mars colony". A thriving metropolis with millions of residents? Or a permanently crewed research station with a few dozen staff? The former is not going to happen in our lifetimes. The later isn't certain but I think it has some chance of happening. But Musk is going to try to set up the later and call it a "Mars colony", with the declared ambition of eventually developing it into the former. Aspirational naming.

> there are too little resources on Mars, and too harsh conditions, for it to make any kind of sense.

In 2021, Musk has a net worth of $170 billion. He's only 50, he could easily live for another 30 or 40 years. It is entirely plausible that by the time he dies, he will be a multi-trillionaire. To whom, or to what, is he going to leave his trillions? (Heck, forty years from now, quadrillionaires could even be a thing, and old man Musk could be one of them.) He might leave them to a charitable foundation dedicated to paying for the colonisation of Mars. If that happens – well, even if you are right that colonising Mars is pointless, if a multi-trillion, or even multi-quadrillion, dollar foundation is willing to pay for it, it may actually happen, no matter how pointless it may be.

Another possible scenario: sometime in the next few decades, the US successfully lands on Mars, and sets up a modestly sized US-led international research base. The US government continues its policy of excluding China, so China responds by landing on Mars independently and establishing their own competing Mars base. China and the US then become trapped in a new space race, in which each seeks to outdo the other with the size and capabilities of their respective Mars bases, not motivated by any practical economic or military benefits, but simply by national pride and prestige. A US-led Mars base could grow into thousands of people, and US Congress might become politically locked into paying for them out of the federal budget, even if their existence doesn't actually benefit the average US citizen in any tangible way.

(The above two scenarios are not mutually exclusive, it is possible both might happen at the same time.)
John Green has put this to words in a very John Green-like way:

But I can recall my every mortification as if it occurred moments ago. I know this because each evening when I finish reading for the night, I’ll turn off my bedside lamp, roll over onto my side, close my eyes, and my brain will say. “Oh, good evening. Should we play the blooper reel?” And I’ll say, “Ah, you know, I’d really rather not,” and my brain will say, “Excellent. Let’s begin in a high school auditorium outside of San Francisco.”

https://www.wnycstudios.org/podcasts/anthropocene-reviewed/e...
Looks a bit like PEZY SC[1] massive multicore MIMD architecture. That one was basically shot down for grant frauds involving CEO but I wonder if this is going to be a spiritual successor.

1: https://news.mynavi.jp/article/hetero_manycore-4/
Talking about tooltips:

Did anybody get Popper to work as an ES6 module? I tried for a while and gave up.
Error handling in Rust isn't always small or straightforward. I miss both options and match expressions when I switch back to Go from Rust, but there's also tangles of or_else's and maps and the fact that everyone uses third-party libraries to work out the types for errors. There's tradeoffs everywhere you look.
Works for me (also japan)
Go is still pretty “simple”. They didn’t introduce a while loop. Adding generics would arguably “simplify” the language even further since you would presumably throw away a lot of duplicated code.
That's not true. There have been plenty of studies showing cloth masks help significantly over nothing, and especially if it's a double layer mask. The cotton ones that are breathable are worse.
But why stop there, if it is even possible to? Hundreds or thousands of species of mosquito, can you genetically target a single one for eradication? And if successful, it's easy to imagine the nuances of different species getting lost in government policies. Compounded by the fact that, maybe aegypti and malaria mosquitos represent an equilibrium that, if disturbed by their genocide...would leave a pathogen-vector vacuum that could be filled by a formerly regressive species that could spread worse pathogens. I think we should play with treatments that affect things that have less moving parts and that we roughly know how to control (like our own bodies, roughly), rather than trying to do 'ecosystem' engineering where we have very little knowledge (or it seems critical caution, from proponents) of how it will be affected in a knock-on sense, which could be disastrous.

Maybe it is a good idea but the consequences of it going wrong are disastrous. Like the Cane Toads that were introduced to Australia to wipe out an insect preying on sugar cane, that then became an endemic threat. But we're not talking about it just affecting flora and fauna, we're talking about something that could affect us. The cure might end up being worse than the disease.

Apart from the equilibrium dynamics, vampiric mosquitos also play a role in horizontal gene transfer and end up actually conveying immunity to the human population for various zoonotic pathogens that would otherwise spread to us: they help our immune systems evolve, and also contribute to evolution of humans.
The key to readability is programming with readability in mind. Sure, languages play some part in that, but 90% of it is the programmer. Go is simple right now, and generics do complicate it, but even with the simplicity that Go has, people already make a giant mess of it. As soon as you get any advanced feature, people will abuse it -- colossal generic functions that take 5 interface{} arguments (but only ever operate on strings), one-off interfaces that have 35 methods, calling out to cgo just because they can, and giant tangles of goroutines, mutexes, semaphores, and sync.Pools all mixed together into one big ball of sadness. But, while everyone has the ability to create such a disaster area, some opt out and use the tool correctly -- making the advanced language features an asset instead of a liability. I don't think generics will change this; when used sparingly and at the right time for the right reason, it will make the code easier to read.

I did a quick look through all my open source projects to see where I have accepted or returned an interface{} in my own APIs, which is a strong signal that I'm looking for generics, or am using a library that wants generics.

One case is interacting with Kubernetes. I have two applications where I set up a reflector like `cache.NewReflector(lw, &v1.Node{}, store, resync)`, to keep a cache up to date; the implementation of "store" takes interface{} for all the arguments (Add, Delete, etc.), even though it only ever operates on a v1.Node. Generics will let me ensure at compile time that I only have to worry about v1.Node objects. Right now, that's handled with runtime assertions in the reflector itself, and in every implementation of the cache.Store. Generics clean this up.

Another case that comes up is processing random JSON objects from the Internet with no defined schema. Those end up as map[string]interface{}, and that won't change.

The last case is unmarshaling functions. I see some (in a JWT validation library) that are of the form `func Unmarshal(string) interface{}`. I don't really know what's going on there, and I don't know if generics will help. (Similarly, for the common case of unmarshaling JSON, I'm not sure generics can improve the `err := json.Unmarshal(bytes, &result)` API. I will have to look into it.

That's about it.
Abertay study finds Vitamin D and milk gives athletes boost
I have seen terrible and unreadable generic code, people building abstractions just for the sake of abstractions.

Hello-world level projects with 20 class deep hierarchies of generic classes, just to make it "generic" in case you need it later.
I wouldn't know, I don't use K8s. But I did write a code-generating ORM for a Go project and found it in a bunch of ways superior to the ORMs I'd used in dynamic languages, like ActiveRecord. And I've also worked with heavily parameterized Rust crates that kept 20 tabs open in my browser just trying to work my way through a couple function calls.

Don't get me wrong, I'd take Rust generics over codegen 8 times out of 10. But that ORM worked well, and was the only time I ever needed to write a code generator in Go.