DEV Community

Discussion on: Apple wants to remove scripting languages from macOS

Collapse
 
3rror profile image
Gianluca Andreotti

Homebrew can't be easily rewritten in some other languages without denaturalizing it.

Homebrew is composed by the core tools and the formulas and while you can remake the first ones in some other languages, the problem lays with the last ones.

Formulas are written in Ruby, using a DSL combined with shell commands: you can check yourself with a simple brew edit wget.
This is different from usual Linux package managers who often rely on (almost) plain shell scripts. Because building instructions are Ruby code, Homebrew can often understand what the code is doing and not just merely executing it.

This characteristic is probably one of the advantages of Homebrew over other package managers and you can't easily replicate it if you rewrite it in other "more native" languages.

In the end, I think this move from Apple is a good thing: many Unix tools shipped with macOS are very old. For example, the bash version in Mojave is from 2007 (for license reason). Python and Ruby are also not at their latest version forcing many software like Homebrew to not use many optimizations and features. Moreover, many developers who use these languages need multiple versions of them, and they install them with tools like rbenv or pyenv.
I think is a good thing letting the community finds and provides the best way to install these interpreters instead of keeping old tools around and letting them rot for ages.