News for hackers. Stuff that matters.
Re:Implementation of a RingBuffer in Java with optional FIFO... by o11c on Wednesday February 05, 2025 @02:59PM (#42954253)
That's about the least-bad thing about the code here - it's a workaround for the fact that Java lacks runtime support for generics.

Other than its indirect use in `copy` (which in Java normally takes the parameter itself), it's probably not actually necessary here since you could just use `Object[]`? But I don't spend enough time in Java (thankfully) so I'm not sure if there are intricacies involving the runtime overhead of casting.

There are no comments on this comment yet.