Hacker News new | ask | show | jobs
by coldtea 4409 days ago
>Often the "strings" package suffices.

Suffices for whom and for what work? Maybe suffices for you. This is not a dynamic vs static language issue -- C and C++ users use regexes all the time. It's a matter of business needs (e.g what you need your program to do).

1 comments

True, but there's also another factor: in Go it's easy to write string manipulation functions that are fast, while in most dynamic languages some regular expressions would run faster than your hand-written routine.
Perhaps, but I'm not 100% about that without some profiling.

For one, Go tends to offer string stuff implemented in Go, whereas dynamic languages usually delegate string operations to plain old C, which can be faster (especially when Unicode is added into the picture).