The blog post "Gleam, Coming from Erlang" explores the author's experience transitioning from Erlang to Gleam, a newer language built on the Erlang Virtual Machine (BEAM). It highlights Gleam's similarities to Erlang, such as its functional nature, immutability, and the benefits of the BEAM ecosystem like concurrency and fault tolerance. However, the author emphasizes key differences, primarily Gleam's static typing, more approachable syntax inspired by Rust and Elm, and its focus on clearer error messages. While acknowledging some current limitations in tooling and library availability compared to Erlang's mature ecosystem, the post ultimately presents Gleam as a promising alternative for building robust, concurrent applications, particularly for developers coming from other statically-typed languages who might find Erlang's syntax challenging.
Clojure offers a compelling blend of practicality and powerful abstractions. Its Lisp syntax, while initially daunting, promotes code clarity and conciseness once mastered. Immutability by default simplifies reasoning about code and facilitates concurrency, while the dynamic nature allows for rapid prototyping and interactive development. Leveraging the vast Java ecosystem provides stability and performance, and the focus on functional programming principles encourages robust and maintainable applications. Ultimately, Clojure empowers developers to build complex systems with elegance and efficiency.
HN commenters generally agree with the author's points on Clojure's strengths, particularly its simple, consistent syntax, powerful data structures, and the benefits of immutability and functional programming for concurrency. Some discuss practical advantages in their own work, citing increased productivity and fewer bugs. A few caution that Clojure's unique features have a learning curve and can make debugging more challenging. Others mention Lisp's historical influence and the powerful REPL as key benefits, while some debate the practicality of Clojure's immutability and the ecosystem's reliance on Java. Several commenters highlight Clojure's suitability for specific domains like data processing and web development. There's also discussion around tooling, with some praise for Clojure's tooling and others mentioning room for improvement.
This paper argues that immutable data structures, coupled with efficient garbage collection and data sharing, fundamentally alter database design and offer significant performance advantages. Traditional databases rely on mutable updates, leading to complex concurrency control mechanisms and logging for crash recovery. Immutability simplifies these by allowing readers to operate without locks and recovery to become merely restarting the latest transaction. The authors present a prototype system, ImmuDB, demonstrating these benefits with comparable or superior performance to mutable systems, particularly in read-dominated workloads. ImmuDB uses an append-only storage structure, multi-version concurrency control, and employs techniques like path copying for efficient data modifications. The paper concludes that embracing immutability unlocks new possibilities for database architectures, enabling simpler, more scalable, and potentially faster databases.
Hacker News users discuss the benefits and drawbacks of immutability in databases, particularly in the context of the linked paper. Several commenters praise the performance advantages and simplified reasoning that immutability offers, echoing the paper's points. Some highlight the potential downsides, such as increased storage costs and the complexity of implementing efficient versioning. One commenter questions the practicality of truly immutable databases in real-world scenarios requiring updates, suggesting the term "append-only" might be more accurate. Another emphasizes the importance of understanding the nuances of immutability rather than viewing it as a simple binary concept. There's also discussion on the different types of immutability and their respective trade-offs, with mention of Datomic and its approach to immutability. A few users express skepticism about widespread adoption, citing the inertia of existing relational database systems.
Summary of Comments ( 57 )
https://news.ycombinator.com/item?id=43169323
Hacker News commenters generally expressed interest in Gleam, praising its friendly syntax and the benefits it inherits from the Erlang ecosystem, like the BEAM VM. Some saw it as a potentially strong competitor to Elixir, appreciating its stricter type system and simpler tooling. A few users familiar with Erlang questioned the necessity of Gleam, suggesting that learning Erlang directly might be more worthwhile. Performance comparisons with Elixir and other BEAM languages were also a topic of discussion, with some expressing hope for benchmarks. A recurring sentiment was curiosity about Gleam's potential to attract a larger community and gain wider adoption. Several commenters also appreciated the author's candid comparison between Gleam and Erlang, finding the article helpful for understanding Gleam's niche.
The Hacker News post titled "Gleam, Coming from Erlang" (https://news.ycombinator.com/item?id=43169323) has generated several comments discussing various aspects of Gleam and its relationship to Erlang.
Several commenters discuss the benefits of Gleam's type system and its impact on developer experience. One user highlights how Gleam allows for compile-time verification of data structures, reducing runtime errors and enhancing overall code reliability, something they contrast positively with Erlang. Another commenter specifically appreciates the improvements Gleam offers in terms of error messages compared to Erlang, suggesting that this makes it a more approachable language for newcomers. The ability to refactor with greater confidence due to the type system is also mentioned as a significant advantage.
The discussion also touches upon Gleam's performance characteristics. One commenter wonders about the performance implications of using Gleam compared to pure Erlang. While acknowledging they haven't benchmarked it themselves, they speculate that the overhead might be negligible, especially given that Gleam compiles to Erlang.
Another thread in the comments focuses on the tooling and ecosystem surrounding Gleam. Users discuss the availability of a formatter and the integration with the Erlang ecosystem, noting that Gleam seamlessly leverages existing Erlang libraries. The relative nascency of the language and its ecosystem is acknowledged, with one user expressing anticipation for further tooling enhancements as the language matures.
The choice of immutability as a core principle in Gleam is also a subject of discussion. A commenter notes that immutability simplifies reasoning about code, especially in concurrent scenarios, echoing the benefits often associated with functional programming paradigms.
Finally, the topic of interoperability between Gleam and JavaScript is brought up. One commenter expresses their desire for improved JavaScript interop to facilitate wider adoption and use cases beyond the backend.
In summary, the comments on Hacker News generally reflect a positive sentiment toward Gleam, praising its type system, Erlang integration, and the benefits it derives from functional programming principles. While acknowledging its relative youth, commenters express optimism about the future development and broader adoption of the language.