Pike is a dynamic programming language combining high-level productivity with efficient performance. Its syntax resembles Java and C, making it easy to learn for programmers familiar with those languages. Pike supports object-oriented, imperative, and functional programming paradigms. It boasts powerful features like garbage collection, advanced data structures, and built-in support for networking and databases. Pike is particularly well-suited for developing web applications, system administration tools, and networked applications, and is free and open-source software.
The blog post "You Need Subtyping" argues that subtyping, despite sometimes being viewed as complex or unnecessary, is a crucial tool for writing flexible and maintainable code. It emphasizes that subtyping allows for writing generic algorithms that operate on a range of related types without needing modification for each specific type. The author illustrates this through examples using shapes and animal sounds, demonstrating how subtyping enables reusable functions that handle different subtypes without explicit type checks. The post further champions subtype polymorphism as a superior alternative to approaches like typeclasses or enums for handling diverse data types, highlighting its ability to gracefully accommodate future type extensions without altering existing code. Ultimately, the author advocates for embracing subtyping as a fundamental concept for building robust and adaptable software systems.
HN users generally disagreed with the premise that subtyping is needed. Several commenters argued that subtyping adds complexity, especially in larger projects, and that its benefits are often overstated. Alternatives like composition and pattern matching were suggested as potentially superior approaches. Some argued that the author conflated subtyping with polymorphism, while others pointed out that the benefits mentioned in the article, like code reuse and extensibility, could be achieved without subtyping. A few commenters discussed the specific example used in the blog post, highlighting its contrived nature and suggesting better alternatives. The overall sentiment was that subtyping is a tool, sometimes useful, but not a necessity.
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.
Summary of Comments ( 37 )
https://news.ycombinator.com/item?id=43734938
HN commenters discuss Pike's niche as a performant, garbage-collected language used for specific applications like the Roxen web server and MUDs. Some recall its history at LPC and its association with the LPC MUD. Several express surprise that it's still maintained, while others share positive experiences with its speed and C-like syntax, comparing it favorably to Java in some respects. One commenter highlights its use in high-frequency trading due to its performance characteristics. The overall sentiment leans towards respectful curiosity about a relatively obscure but seemingly capable language.
The Hacker News post titled "Pike – a dynamic programming language with a syntax similar to Java and C" linking to the official Pike website (pike.lysator.liu.se) has a modest number of comments, generating a short discussion rather than an extensive debate. Several commenters reminisce about their past experiences with Pike, mostly from the late 1990s and early 2000s. A common theme is remembering Pike's association with the LPC language and its use in MUDs (Multi-User Dungeons), particularly the LPMud driver. Some users recall enjoying using Pike, praising its performance and features, while acknowledging its somewhat limited adoption.
One commenter specifically mentions using it for web development around 2000, finding it fast and well-suited to the task. They contrast this with their current usage of PHP and express a sense of nostalgia for Pike. Another user highlights Pike's then-advanced features like garbage collection and its module system.
The connection to the Roxen web server is also brought up, with a commenter mentioning that Roxen was originally written in Pike, showcasing a real-world application of the language.
A couple of comments speculate on the reasons for Pike's relative obscurity. One suggests that its unique name might have hindered its discoverability, as searching for information about it would have been difficult in the pre-Google era. Another commenter posits that Pike may have been "ahead of its time" and that some of its concepts, like garbage collection, were not as widely appreciated or understood back then.
There's a brief exchange about the current state of Pike, where a commenter clarifies that it is still actively maintained, albeit by a smaller community. Finally, one commenter mentions a seemingly unrelated project, the "Roxy" file manager, leading another to correct them and explain that Roxy was unrelated to Roxen or Pike.
Overall, the comments paint a picture of Pike as a language with a dedicated, though niche, following. Many remember it fondly for its capabilities and performance, particularly in the context of MUDs and early web development. The discussion also touches upon potential reasons for its limited adoption, including discoverability issues and the historical context of its features.