delvingbitcoin

BTC Lisp as an alternative to Script

BTC Lisp as an alternative to Script

Original Postby ajtowns

Posted on: March 19, 2024 00:48 UTC

The conversation delves into the nuances of programming languages, particularly focusing on Simplicity, a language designed for blockchain applications, and its comparison with other languages like Chia Lisp.

The discussion begins with an acknowledgment of Simplicity's potential but also expresses reservations about its suitability as a consensus language, which is critical for blockchain technologies. The person initiating the conversation is open to exploring other languages, suggesting that this exploration could either highlight Simplicity’s strengths or uncover valuable alternatives.

One key point of discussion centers around the concept of looping in programming languages, which is highlighted through the example of calculating a signature hash in a transaction, involving repetitive processing of inputs and outputs. This introduces the question of how Simplicity accommodates such operations, given its constraints compared to languages that allow explicit looping mechanisms. The explanation hints at the use of recursion in Simplicity to achieve similar outcomes, though with inherent limitations, raising questions about the practicality and efficiency of such approaches.

The conversation transitions into a broader analysis of programming languages within the context of blockchain development, using a diagram to illustrate the relationship between different aspects of language design: Development Environment, High Level Language, Consensus Language, and Formalization. Each component is discussed in terms of its significance and current implementations, such as Bitcoin script's lack of formalization and the experimental state of high-level tooling for Simplicity. This analysis not only explores the technical foundations of these languages but also touches on their practical implications, including reviewability, predictability, and the capacity to prevent bugs.

A comparison between Chia Lisp and Simplicity reveals fundamental differences, notably in their typing systems—dynamic versus static—which influences their adaptability and effectiveness as consensus languages. The discussion raises concerns about the complexity and accessibility of implementing and understanding Simplicity, despite its robust formalism. It suggests that simplicity and reviewability at every layer are desirable traits for programming languages, especially in contexts where security and transparency are paramount.

Finally, the possibility of integrating just-in-time (JIT) compilation with Simplicity is mentioned as a theoretical means to enhance performance without sacrificing safety, albeit with reservations about the added complexity this might introduce. The conversation concludes by emphasizing the importance of having both low-level and high-level language considerations in blockchain development, and the potential for cross-language analysis tools to identify high-level issues in scripts, hinting at a future where language choice may be informed by broader criteria than currently appreciated.