Re:What I Learned About MP3 Encoding
by lelanthran on Wednesday October 11, 2023 @02:42AM
(#37841663)
> source code portability is only a part of portability.
I broadly agree, but in this particular case:
1. LAME compiles just fine using multiple different compilers on Windows (including an older MSVC - newer ones will error out on the use of unsafe functions, fixed by passing a #define in a flag).
2. LAME has no dependencies to download.
3. LAME is successfully used from many other languages on Windows.
So, yeah, if it's not working for him but works for everyone else, you can't blame C for portability here.
OTOH, because LAME is written in C, you have even more options - don't compile it yourself. Download the compiled LAME .dll and just use it from Go.
Author didn't even try the easiest option, said easiest option being possible only because it was written in C.
[1] For example, Rust `openssl` crate was notably annoying to compile for a long time, even on macOS (it took literally years to make the typical experience smooth enough). And yet it was an essential component for HTTPS! Today we would use the `native-tls` crate instead that avoids OpenSSL on Windows and macOS.