Richard Feldman, Elm pioneer and creator of the Roc programming language, discusses his motivations for developing Roc as an evolution of Elm. He shares insights on governance models, emphasizing simplicity and user feedback in programming design. The conversation dives into how teaching Elm shaped Roc’s features, and how it aims to integrate seamlessly with existing systems. Additionally, Richard highlights the unique role of platforms in Roc, setting it apart from traditional languages and enhancing development experiences.
Richard Feldman created Roc to extend Elm's usability into multiple domains like mobile apps and command line tools, addressing a significant gap in programming languages.
Roc's platform-centric design enables developers to target specific application types, incorporating relevant I/O primitives which streamline the development process for different uses.
Feldman's teaching experience with Elm significantly shaped Roc's design, leading to features that simplify onboarding and reduce cognitive overhead for new users.
Deep dives
The Birth of Rock Programming Language
The inspiration behind the Rock programming language stemmed from exploring the need for an Elm-like language across multiple domains such as command line applications, mobile apps, and robotics. Richard Feldman, the creator of Rock, noted that while Elm excels in front-end development, it does not cater to other domains like writing Vim extensions or building desktop GUIs. This realization highlighted a gap in the programming language landscape where an Elm-like experience was missing for broader use cases. Feldman recognized the potential to create a language that encompasses the essential elements of Elm while introducing new features tailored for these various domains.
Key Motivations and Design Decisions
Several factors motivated Feldman to develop Rock, including the desire to try out ideas that were unlikely to be incorporated into Elm due to its established ecosystem. For example, Rock does not include currying, a feature that Elm uses extensively, as Feldman believed it added unnecessary complexity. As he neared the completion of his book 'Elm in Action,' he sought a larger, long-term project, which led to the conception of Rock. The pursuit of a functional programming language that prioritizes both simplicity and usability across different applications became a defining vision for its design.
Platform Design and Application Variety
Rock introduces a distinct concept of platforms, allowing developers to target specific application types such as web servers, command line tools, and desktop applications. This structure ensures that each application type has relevant I/O primitives available, enhancing the ease of development for specific purposes. For instance, writing a web server would exclude unnecessary primitives like standard input, streamlining the programming process. This platform-centric design empowers developers to use Rock across a variety of domains, reflecting on the adaptability and extensibility of the language.
Learning from Teaching Experiences
Feldman's experiences teaching Elm influenced the design of Rock, particularly concerning the ease of onboarding new users. Key challenges observed during his workshops included understanding JSON decoding and the concept of currying, both of which often confused beginners. To address this, Rock incorporates features that simplify these learning curves, such as automatic type inference for JSON encoding, which eliminates the need for complex pipelines. Additionally, by removing currying from the language altogether, Rock reduces cognitive overhead, making it more accessible to new users coming from varying programming backgrounds.
Governance and Future Aspirations
Feldman aims to maintain Rock's simplicity and integrity through a governance model that promotes cautious feature addition over time. He advocates for a benevolent dictatorship approach initially, allowing meaningful input from contributors while ultimately making decisions himself. The objective is to avoid the typical erosion of simplicity seen in other programming languages as they evolve through committee governance. As Rock develops, Feldman hopes to transition into a more sustainable model that retains its foundational principles, balancing the introduction of new functionalities with a commitment to maintaining a streamlined user experience.
Elm pioneer Richard Feldman returns to explain why he made Roc, a direct descendant of Elm. He notes a distinct trade-off of choosing not to have persistent data structures. Later, he shares how his experience teaching Elm informed Roc's design. We even learn about the power of platforms.