<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: someone_19</title><link>https://news.ycombinator.com/user?id=someone_19</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Wed, 10 Jun 2026 09:29:59 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=someone_19" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by someone_19 in "Go: Support for Generic Methods"]]></title><description><![CDATA[
<p>Ada is the lost knowledge of a past, more advanced civilization.</p>
]]></description><pubDate>Thu, 28 May 2026 07:59:38 +0000</pubDate><link>https://news.ycombinator.com/item?id=48306012</link><dc:creator>someone_19</dc:creator><comments>https://news.ycombinator.com/item?id=48306012</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48306012</guid></item><item><title><![CDATA[New comment by someone_19 in "Go: Support for Generic Methods"]]></title><description><![CDATA[
<p>> No, you’re clearly wrong; golang was always going to add support for generic functions.<p>Let's get this straight. I'll give you a long quote from Rob Pike's article where he describes the history of the go language:<p>"""
One thing that is conspicuously absent is of course a type hierarchy. Allow me to be rude about that for a minute.<p>Early in the rollout of Go I was told by someone that he could not imagine working in a language without generic types. As I have reported elsewhere, I found that an odd remark.<p>To be fair he was probably saying in his own way that he really liked what the STL does for him in C++. For the purpose of argument, though, let's take his claim at face value.<p>What it says is that he finds writing containers like lists of ints and maps of strings an unbearable burden. I find that an odd claim. I spend very little of my programming time struggling with those issues, even in languages without generic types.<p>But more important, what it says is that types are the way to lift that burden. Types. Not polymorphic functions or language primitives or helpers of other kinds, but types.<p>That's the detail that sticks with me.<p>Programmers who come to Go from C++ and Java miss the idea of programming with types, particularly inheritance and subclassing and all that. Perhaps I'm a philistine about types but I've never found that model particularly expressive.<p>My late friend Alain Fournier once told me that he considered the lowest form of academic work to be taxonomy. And you know what? Type hierarchies are just taxonomy. You need to decide what piece goes in what box, every type's parent, whether A inherits from B or B from A.  Is a sortable array an array that sorts or a sorter represented by an array? If you believe that types address all design issues you must make that decision.<p>I believe that's a preposterous way to think about programming. What matters isn't the ancestor relations between things but what they can do for you.<p>That, of course, is where interfaces come into Go. But they're part of a bigger picture, the true Go philosophy.
"""<p>Rob Pike, 2012<p>I can draw a few conclusions from this: firstly, he didn't want to add generics at all because he didn't think they were useful, and secondly, he doesn't understand programming very well and doesn't know what generics are and confuses them with inheritance.</p>
]]></description><pubDate>Thu, 28 May 2026 07:20:52 +0000</pubDate><link>https://news.ycombinator.com/item?id=48305733</link><dc:creator>someone_19</dc:creator><comments>https://news.ycombinator.com/item?id=48305733</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48305733</guid></item><item><title><![CDATA[New comment by someone_19 in "Go: Support for Generic Methods"]]></title><description><![CDATA[
<p>You already have iota. Type safety is not needed by design:<p>> Go intentionally has a weak type system... Go in general encourages programming by writing code rather than programming by writing types...<p><a href="https://github.com/golang/go/issues/29649#issuecomment-454820179" rel="nofollow">https://github.com/golang/go/issues/29649#issuecomment-45482...</a></p>
]]></description><pubDate>Thu, 28 May 2026 07:02:01 +0000</pubDate><link>https://news.ycombinator.com/item?id=48305597</link><dc:creator>someone_19</dc:creator><comments>https://news.ycombinator.com/item?id=48305597</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48305597</guid></item><item><title><![CDATA[New comment by someone_19 in "Go: Support for Generic Methods"]]></title><description><![CDATA[
<p>...and Java didn't even have basic enums or sum types from the beginning. But it had null.<p>They added enums, they added sealed classes. They're trying to get rid of null (apparently it's really hard). The problem is that in 2012, when go 1.0 was released, this should have been obvious to everyone.<p>Here's a famous discussion from 2009, three years before the 1.0 release (tldr: facepalm)<p><a href="https://groups.google.com/g/golang-nuts/c/rvGTZSFU8sY" rel="nofollow">https://groups.google.com/g/golang-nuts/c/rvGTZSFU8sY</a></p>
]]></description><pubDate>Wed, 27 May 2026 16:38:25 +0000</pubDate><link>https://news.ycombinator.com/item?id=48296783</link><dc:creator>someone_19</dc:creator><comments>https://news.ycombinator.com/item?id=48296783</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48296783</guid></item><item><title><![CDATA[New comment by someone_19 in "Go: Support for Generic Methods"]]></title><description><![CDATA[
<p>So you mean to say that PHP5 and Js from 2007 had a well-founded design?</p>
]]></description><pubDate>Wed, 27 May 2026 16:32:00 +0000</pubDate><link>https://news.ycombinator.com/item?id=48296705</link><dc:creator>someone_19</dc:creator><comments>https://news.ycombinator.com/item?id=48296705</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48296705</guid></item><item><title><![CDATA[New comment by someone_19 in "Go: Support for Generic Methods"]]></title><description><![CDATA[
<p>I agree that they were clearly not in a hurry. I disagree that they are doing everything right. I am interested to see how they will fix the 'million dollars mistake'.</p>
]]></description><pubDate>Wed, 27 May 2026 16:30:27 +0000</pubDate><link>https://news.ycombinator.com/item?id=48296676</link><dc:creator>someone_19</dc:creator><comments>https://news.ycombinator.com/item?id=48296676</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48296676</guid></item><item><title><![CDATA[New comment by someone_19 in "Go: Support for Generic Methods"]]></title><description><![CDATA[
<p>Indeed, in 2012, it was not clear to anyone that generics were needed /s</p>
]]></description><pubDate>Wed, 27 May 2026 16:27:57 +0000</pubDate><link>https://news.ycombinator.com/item?id=48296640</link><dc:creator>someone_19</dc:creator><comments>https://news.ycombinator.com/item?id=48296640</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48296640</guid></item><item><title><![CDATA[New comment by someone_19 in "JavaScript-heavy approaches are not compatible with long-term performance goals"]]></title><description><![CDATA[
<p>> but the good parts of JS are better than anything else in existence<p>What you talking about?! I can't think of a single thing in Js that I could say is good.<p>Okay, two big corporations have invested a lot of money and effort into making V8 and TypeScript, and now it's useful. But I don't consider it exactly part of Js.</p>
]]></description><pubDate>Mon, 16 Feb 2026 09:59:39 +0000</pubDate><link>https://news.ycombinator.com/item?id=47033101</link><dc:creator>someone_19</dc:creator><comments>https://news.ycombinator.com/item?id=47033101</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47033101</guid></item><item><title><![CDATA[New comment by someone_19 in "Use Your Type System"]]></title><description><![CDATA[
<p>Here is example of compile time error with wrong newtype argument:<p><a href="https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=ecfa34c3577f8b0e3e60b336c189ab1c" rel="nofollow">https://play.rust-lang.org/?version=stable&mode=debug&editio...</a><p>rust-analyzer gives an error directly in IDE.</p>
]]></description><pubDate>Fri, 25 Jul 2025 05:34:50 +0000</pubDate><link>https://news.ycombinator.com/item?id=44679887</link><dc:creator>someone_19</dc:creator><comments>https://news.ycombinator.com/item?id=44679887</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44679887</guid></item><item><title><![CDATA[New comment by someone_19 in "Use Your Type System"]]></title><description><![CDATA[
<p>Unhappy way is a part of contract. So yes, that is what I want. If a function couldn't fail before but can after the update - I want to know about it.<p>In fact, at each layer, if you want to propagate an error, you have to convert it to one specific to that layer.</p>
]]></description><pubDate>Thu, 24 Jul 2025 20:54:01 +0000</pubDate><link>https://news.ycombinator.com/item?id=44675981</link><dc:creator>someone_19</dc:creator><comments>https://news.ycombinator.com/item?id=44675981</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44675981</guid></item><item><title><![CDATA[New comment by someone_19 in "Use Your Type System"]]></title><description><![CDATA[
<p>You can do this quite easily in Rust. But you have to overload operators to make your type make sense. That's also possible, you just need to define what type you get after dividing your type by a regular number and vice versa a regular number by your type. Or what should happen if when adding two of your types the sum is higher than the maximum value. This is quite verbose. Which can be done with generics or macros.</p>
]]></description><pubDate>Thu, 24 Jul 2025 20:42:27 +0000</pubDate><link>https://news.ycombinator.com/item?id=44675844</link><dc:creator>someone_19</dc:creator><comments>https://news.ycombinator.com/item?id=44675844</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44675844</guid></item><item><title><![CDATA[New comment by someone_19 in "The borrowchecker is what I like the least about Rust"]]></title><description><![CDATA[
<p>Maybe once or twice a month I'll get some language issue (like no negative trait bounds, restrictions on generic const, or something related to lifetime). I might spend an hour or more on each such case.</p>
]]></description><pubDate>Mon, 21 Jul 2025 17:58:24 +0000</pubDate><link>https://news.ycombinator.com/item?id=44638292</link><dc:creator>someone_19</dc:creator><comments>https://news.ycombinator.com/item?id=44638292</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44638292</guid></item><item><title><![CDATA[New comment by someone_19 in "The borrowchecker is what I like the least about Rust"]]></title><description><![CDATA[
<p>> It's essentially impossible to write a Rust program without relying on many of its escape hatches like RefCell and unsafe, that make the borrow checker go away.<p>This is very contrary to my experience. I don't use cloning or various primitives (except when I really need the shared state).<p>I can assume that you have this opinion because you see it as a low-level problem while its solution lies at the architectural level.<p>Use pure functions, group data in structures that own it, get all the necessary data in the controller, process it, and return or store it.</p>
]]></description><pubDate>Mon, 21 Jul 2025 17:52:24 +0000</pubDate><link>https://news.ycombinator.com/item?id=44638215</link><dc:creator>someone_19</dc:creator><comments>https://news.ycombinator.com/item?id=44638215</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44638215</guid></item><item><title><![CDATA[New comment by someone_19 in "The borrowchecker is what I like the least about Rust"]]></title><description><![CDATA[
<p>...and using it in function calls would also be inconvenient.<p>Now I have a clear understanding of what is happening and how.<p>Nevertheless, using something like this for educational purposes maybe could help. Author of the article In the example with Id literally complains that moving makes moving.</p>
]]></description><pubDate>Mon, 21 Jul 2025 17:04:00 +0000</pubDate><link>https://news.ycombinator.com/item?id=44637570</link><dc:creator>someone_19</dc:creator><comments>https://news.ycombinator.com/item?id=44637570</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44637570</guid></item><item><title><![CDATA[New comment by someone_19 in "The borrowchecker is what I like the least about Rust"]]></title><description><![CDATA[
<p>My first thought when I was learning Rust was "Why don't they use a different operator for move?", something like:<p>let a <= String::from("Hi");<p>let b <= a;<p>let j = 0; // Copy<p>let k = j;<p>This may not be convenient, but it could be useful for educational purposes.</p>
]]></description><pubDate>Mon, 21 Jul 2025 15:48:14 +0000</pubDate><link>https://news.ycombinator.com/item?id=44636612</link><dc:creator>someone_19</dc:creator><comments>https://news.ycombinator.com/item?id=44636612</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44636612</guid></item><item><title><![CDATA[New comment by someone_19 in "The borrowchecker is what I like the least about Rust"]]></title><description><![CDATA[
<p>> Second is an absolutely strict programming language, that incorporates not only memory membership Rust style, but every single object must have a well defined type that determines not only the set of values that the object can have, but the operations on that object, which produce other well defined types. Basically, the idea is that if your program compiles, its by definition correct.<p>That is Rust? This is how his system of types and traits works.</p>
]]></description><pubDate>Mon, 21 Jul 2025 14:39:50 +0000</pubDate><link>https://news.ycombinator.com/item?id=44635649</link><dc:creator>someone_19</dc:creator><comments>https://news.ycombinator.com/item?id=44635649</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44635649</guid></item><item><title><![CDATA[New comment by someone_19 in "The borrowchecker is what I like the least about Rust"]]></title><description><![CDATA[
<p>Look at vectors or hash maps. This is a perfect example of the Rust philosophy. Namely, writing complex low-level abstractions that offer a convenient and reliable high-level API.<p>It uses unsafe, but few people understand what it really is. Rust has clear invariants (for example, that a pointer to T always points to an existing and valid T) that are enforced by the compiler. Using unsafe code is shifting the enforcement of these invariants from the compiler to the programmer. The advantage compared to C is that unsafe code is limited to undefined blocks that are easy to test.<p>The data structure you describe should be done exactly this way. And it is not a task for the average programmer.</p>
]]></description><pubDate>Mon, 21 Jul 2025 14:34:48 +0000</pubDate><link>https://news.ycombinator.com/item?id=44635592</link><dc:creator>someone_19</dc:creator><comments>https://news.ycombinator.com/item?id=44635592</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44635592</guid></item><item><title><![CDATA[New comment by someone_19 in "The borrowchecker is what I like the least about Rust"]]></title><description><![CDATA[
<p>> Golang is basically just more concise Java<p>But golang/newsqueak was developed much earlier, in the early 80s by Rob Pike.<p><a href="https://en.wikipedia.org/wiki/Newsqueak" rel="nofollow">https://en.wikipedia.org/wiki/Newsqueak</a><p>```<p>type point: struct of{ x, y: int; }<p>a:=mk(array[10] of int) // mk renamed to make<p>select{
  case i = <-c1:
    a = 1;
  case c2<- = i:
    a = 2;
}<p>```<p>In the late 2000s, this language updated somewhat (for example, the mk function was renamed to make).</p>
]]></description><pubDate>Mon, 21 Jul 2025 12:40:25 +0000</pubDate><link>https://news.ycombinator.com/item?id=44634422</link><dc:creator>someone_19</dc:creator><comments>https://news.ycombinator.com/item?id=44634422</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44634422</guid></item></channel></rss>