News for hackers. Stuff that matters.
Re:Interface Upgrades in Go by MrBuddyCasino on Sunday June 23, 2024 @08:27AM (#40766941)
Am I missing something or is this a lot of words to describe the equivalent of the JVMs instanceof / type casting operator?
Re:Interface Upgrades in Go by neonsunset on Sunday June 23, 2024 @09:44AM (#40767423)
It is. What's with the languages and their communities trying to reinvent worse wheel and label it with a new word all the time?

    if (thing is IFasterThing ft)
    {
        ft.FastPath(arg1, arg2);
    }
Re:Interface Upgrades in Go by blev on Sunday June 23, 2024 @10:49AM (#40767840)
The author’s mistake was assuming that interfaces are unique to Go. I think it’s still a helpful article as someone who works frequently with interfaces because, while I “discovered” the interface upgrade idea on my own, I had never considered the proxy problem.
Re:Interface Upgrades in Go by philosopher1234 on Sunday June 23, 2024 @12:36PM (#40768672)
Go’s interfaces are unique in that they are structural, which makes this problem more difficult to solve.