Suffix Array access

121 views
Skip to first unread message

Piotr Wyderski

unread,
Feb 13, 2023, 9:52:00 AM2/13/23
to golang-nuts
Hello,

The "index/suffixarray" does a great job of providing users with a decent implementation of the SAIS algorithm. But why does the package hide the ints suffix array from its users and forces them to use the Lookup method? In my application, I build a suffix array to get, well, the suffix array, not the convenience wrappers. Cloning the entire implementation just to make the internals accessible to me looks sinister. Should I send a patch giving users low-level access to the internals, or is the package considered complete? Or could you please replace text_64 with Text_64?

    Best regards, Piotr

Ian Lance Taylor

unread,
Feb 13, 2023, 2:46:22 PM2/13/23
to Piotr Wyderski, golang-nuts
On Mon, Feb 13, 2023 at 6:52 AM Piotr Wyderski <piotr.w...@gmail.com> wrote:
>
> The "index/suffixarray" does a great job of providing users with a decent implementation of the SAIS algorithm. But why does the package hide the ints suffix array from its users and forces them to use the Lookup method? In my application, I build a suffix array to get, well, the suffix array, not the convenience wrappers. Cloning the entire implementation just to make the internals accessible to me looks sinister. Should I send a patch giving users low-level access to the internals, or is the package considered complete? Or could you please replace text_64 with Text_64?

This package is considered frozen. It was originally introduced to be
used by godoc. If we had had internal packages back then, it would
have been an internal package. It is now no longer used by any
package in the standard library, and is only being retained for
backward compatibility. We don't expect to change the package at all
going forward. If you need changes, I suggest simply copying it into
your own package.

Ian

Piotr Wyderski

unread,
Feb 14, 2023, 3:33:49 AM2/14/23
to golang-nuts
Hello Ian,

Thank you for your answer. This statement settles it down. I'll do what you suggest.
 
    Best regards, Piotr
Reply all
Reply to author
Forward
0 new messages