news.volyx.in

Amber: Programming language compiled to Bash (amber-lang.com)

463 points by weaksauce · 815 days ago · 314 comments on HN

Article summary

Amber is a programming language that compiles to Bash, offering an ECMA Script-like syntax and strong typing to catch bugs at compile time. It also generates documentation automatically and interoperates with Bash scripts. The language has a standard library with many useful functions and has won an award. Amber aims to make shell scripting more enjoyable and efficient.

Main themes

  • Shell scripting
  • Programming language design
  • Bash compatibility
  • Type safety
  • Syntax and readability
  • Alternative to Bash

What commenters say

  • The use of bc and sed for integer comparison in the example code is unnecessary and inefficient, and a native integer type would be more suitable.
  • Amber's syntax and design are promising, but the language is not yet mature and lacks essential features like pipes and redirection.
  • The website's design and marketing approach are misleading and may deter potential users who are looking for a genuine open-source utility.
  • Amber fills a niche for shell scripting and offers a more ergonomic way of running external shell commands compared to languages like Python.
  • The choice of name 'Amber' is problematic due to the existence of another project with the same name, which may cause confusion.
  • The lack of integer types in Amber may lead to inefficient numerical operations, and the use of a single 'number' type is a strange design choice.
  • Despite its limitations, Amber has the potential to be a useful tool for shell scripting and is worth keeping an eye on as it evolves.