Fish 4

Rust Rewrite and Performance

  • Main excitement is that Fish 4.0 is now implemented in Rust; many are curious whether it’s faster than the C++ version.
  • Maintainers indicate performance is currently similar; the initial goal was a straightforward port, with optimizations to come later.
  • One view: Rust won’t be faster “just because” unless algorithmic or performance bugs were fixed.
  • Counter-view: Rust’s aliasing/borrowing guarantees give LLVM more optimization opportunities than typical C++ (which rarely uses restrict-style guarantees), and developers feel safer doing aggressive refactors.
  • There’s ongoing work in the Rust ecosystem to pin down memory model/unsafe semantics, but not yet a wave of new optimizations based on that.
  • A user benchmark shows Rust debug builds being faster than C++, but C++ slightly faster in release; binary size increased ~1.8× and build times ~1.4×.
  • LOC increased from ~57k C++ to ~75k Rust; rustfmt’s multi-line style and added features explain much of it.

Safety, Readability, and Code Size

  • Several comments describe Rust as “noisy,” with more lines due to exhaustive match, explicit error handling, and multi-line chaining.
  • Many argue LOC is a bad metric; explicitness and readability, especially around safety, are more valuable.
  • Exhaustive pattern matching and strictness are seen as major benefits; some wish all statically typed languages enforced this as hard errors.

Fish UX: Strengths

  • Widely praised for autocompletion, inline help, good defaults, and relatively painless completion-script development.
  • Some users find many tasks intuitive in Fish that feel like “magic incantations” in Bash.
  • Common setup: use Fish interactively, Bash/sh for scripts and remote systems.

Fish UX: Pain Points and Compatibility

  • Biggest friction: non-POSIX syntax (no $() etc.), making copied Bash snippets fail and forcing fallbacks to Bash.
  • Environment variable scopes (universal/global/etc.) are reported as hard to remember when used infrequently.
  • Some only use Fish for completion and stay in Bash/Zsh for everything else; others feel “disempowered” when leaving Bash they deeply know.
  • There’s mention of a clever workaround to transparently run pasted Bash via a background Bash daemon from Fish.
  • Nushell is seen as more radical and less suitable for ubiquitous interactive use; some fear it would hurt their ability to work in Bash/Zsh.

AI and Shell Scripting

  • One side claims better syntax matters less with LLMs generating one-liners.
  • Others strongly push back: you still must understand/verify, Bash semantics are subtle, and shell scripts are too dangerous to trust to AI output.

Rewrite Scope, Tooling, and Ecosystem

  • Some are impressed that such a large rewrite has (almost) no user-visible change; others say invisible rewrites are routine in big companies.
  • Brief discussion of packaging (Homebrew lag, now resolved).
  • Rust port initially cost Cygwin support; later Rust gained a Cygwin target, so this may change.
  • Side discussion on why so many shells exist, and whether shell UX has stagnated relative to older, more ambitious systems.