The author reflects positively on their experience using Lua for a 60k-line project. They praise Lua's speed, small size, and ease of embedding. While acknowledging the limited ecosystem and tooling compared to larger languages, they found the simplicity and resulting stability to be major advantages. Minor frustrations included the standard library's limitations, especially regarding string manipulation, and the lack of static typing. Overall, Lua proved remarkably effective for their needs, offering a productive and efficient development experience despite some drawbacks. They highlight LuaJIT's exceptional performance and recommend it for CPU-bound tasks.
Migrating a large, mature Scala 2 codebase (a Play Framework web application) to Scala 3 proved to be a generally smooth experience, with surprisingly few major hurdles. While the compiler was strict and uncovered some pre-existing issues, most migration problems were readily solvable with minor code adjustments. The new features, like enums and opaque types, offered significant improvements in type safety and code clarity. Performance saw a slight improvement, and the migration ultimately simplified the codebase, reducing boilerplate and improving maintainability. The biggest challenge was handling macros, which required waiting for compatible libraries or implementing workarounds. Overall, the author strongly recommends migrating to Scala 3, highlighting the long-term benefits over the manageable short-term effort.
HN users generally praised the blog post for its honesty and detailed account of a real-world Scala 3 migration. Several commenters echoed the author's struggles with the IntelliJ Scala plugin and its impact on the migration process. Some highlighted the benefits of Scala 3's new features, particularly the improved type system and metaprogramming capabilities. Others discussed the challenges of community adoption and the fragmentation caused by libraries not yet supporting Scala 3. A few users questioned the overall value proposition of Scala 3, given the migration effort required. The lack of comprehensive documentation and the steep learning curve for some features were also mentioned as pain points.
Summary of Comments ( 85 )
https://news.ycombinator.com/item?id=43723088
Hacker News users generally agreed with the author's assessment of Lua, praising its speed, simplicity, and ease of integration. Several commenters highlighted their own positive experiences with Lua, particularly in game development and embedded systems. Some discussed the limitations of the standard library and the importance of choosing good third-party libraries. The lack of static typing was mentioned as a drawback, though some argued that good testing practices mitigate this issue. A few commenters also pointed out that 60k lines of code is not exceptionally large, providing context for the author's experience. The overall sentiment was positive towards Lua, with several users recommending it for specific use cases.
The Hacker News post discussing the blog post "What do I think about Lua after shipping a project with 60k lines of code?" has generated a moderate number of comments, many of which delve into the nuances of Lua, its strengths, and its weaknesses, especially concerning larger projects.
Several commenters discuss the challenges of maintaining a large Lua codebase. One commenter points out the importance of establishing robust conventions and leveraging tools for static analysis and linting early on, citing their own experience with a 200k-line Lua project. They emphasize the need for clear coding guidelines to prevent the code from becoming unwieldy, especially when multiple developers are involved. This resonates with another comment that suggests using Typed Lua to mitigate some of these issues.
Another prevalent theme is the discussion around Lua's lack of a robust standard library, with several commenters agreeing that this often leads to developers reinventing the wheel or relying on external libraries. This can lead to dependency management challenges and potential inconsistencies in the codebase. One user specifically mentions missing functionality for handling HTTP requests and JSON parsing as common examples where external dependencies become necessary.
A few comments praise Lua's speed and simplicity, recalling positive experiences using it for embedded systems and game development. One user specifically mentions the ease of embedding and the performance benefits it offers in these contexts.
The discussion also touches upon Lua's dynamic typing. While acknowledging that this can be convenient for smaller projects, some commenters express concerns about its suitability for larger codebases, where static typing can offer better error detection and maintainability. This ties back to the earlier discussion around Typed Lua and the desire for better tooling to improve code quality in large Lua projects.
Finally, a couple of comments compare Lua to other languages like Python and JavaScript, discussing their relative strengths and weaknesses in different scenarios. One commenter suggests that Python's richer ecosystem might make it a better choice for some projects, while another highlights Lua's speed advantage, particularly when embedded within a larger application.
Overall, the comments paint a picture of Lua as a powerful and performant language well-suited for specific niches like game scripting and embedded systems, but one whose lack of a robust standard library and static typing can present challenges when scaling to larger projects. The discussion highlights the importance of adopting rigorous coding practices and potentially leveraging tools like Typed Lua to mitigate these challenges.