Self-Contained TypeScript Programs Using Bun
The author expresses frustration with Python's dependency management, often leading to non-functional applications. They find Bun's auto-install feature, particularly for TypeScript projects, to be a superior alternative. While Python's uv uses special comments to declare dependencies, the author views this as a hacky method. Bun, conversely, handles dependencies by simply allowing normal imports. When a Bun script is executed, it automatically detects, downloads, installs, and caches any missing packages. This process eliminates the need for manual setup like package.json or running npm install. The author demonstrates Bun's auto-install with a TypeScript script that fetches jokes and activities. They highlight Bun's speed and efficiency, suggesting it represents a more natural and modern approach to development compared to Python. Ultimately, the author advocates for adopting TypeScript and its associated tools like Bun.