On Sat, Jun 13, 2020 at 4:42 PM Tom Limoncelli <t...@whatexit.org> wrote:
I'd suggest to just write the short 'end' function by yourself if you think it's useful for you. It does not harm performance as it will get inlined AFAICT. But it IMO hurts readability a bit. I'd prefer to read the explicit `len(x)-1` instead. Even within `len(x)-1-(y-1)` and similar. And wrt to coders "optimizing" that to `len(x)-y`? I think I've sinned that way too, but I hope I've learnt the lesson. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAA40n-WvbQr2d4yFf%3DN5msqGC_zEpGAM%3DA4Otrpquw%3DC0rsm6A%40mail.gmail.com.