Cadence——面向资源的编程

Cadence是一种高级的面向资源的编程语言,设计用于区块链环境,特别是智能合约开发。它强调资源的概念,确保数字资产的唯一性、不可复制性和安全性。资源在任何时候只能存在于一个地方,不能被复制或意外删除,所有权由其存储位置定义。Cadence的语法易于阅读,静态类型系统减少了运行时错误,提高了代码审核和性能。面向资源的编程能有效防止如重入错误等问题,提供基于功能的安全性,并便于费用管理和灵活的所有权结构。
摘要由CSDN通过智能技术生成

软件工程师们经常使用“所有权”一词,用来表示,某块代码负责管理某种数据结构或系统资源。这种隐喻在编程环境中最为普遍,在这种环境中,内存管理并非是从程序成员那里抽象出来的,所谓的代码“拥有”一个对象,就是说代码有权管理并释放分配给该对象的内存。

但是,当我们在其他任何情况下降低“所有权”时,通常是在拥有长期价值的资产,而不是短暂的数据结构。但是可以使用现有的编程环境来跟踪资产的所有权,但是它们通常用公链区块链的独特之处在于,其明确设计用于管理真正稀缺和完全访问控制的数字资产所有权。诸如比特币或 Flow 之类的公链。区块链上的数字资产应表现得像有形资产:不得复制或伪造,只能转让。

伴随着区块链链的发展,代表所有权的机制也发生了变化。比特币是使用“未用交易输出”或称为 UTXO 的所有权模型重构的。虽然 UTXO 模型非常高效,但它很复杂并且会不幸的是,以太坊模型几乎没有针对编程出现的错误进行保护措施,导致程序的错误造成加密货币社区损失了超过 10 亿美元的资金。

理想情况下,预测管理数字专有的编程语言应包括数字资产的本身的表示形式,并具有防止破坏价值的错误的内置保护措施。

Cadence 介绍,一种高级的面向资源的编程语言

去年,在对更好的智能合约语言进行学术研究之后,Flow 团队正在研究在区块链环境中使用线性类型。而几乎在同一时间,Libra 团队发布了最初的公告,其中包括 MoveVM 的技术细节。

Libra 团队基于线性类型的启发,构建了新所有权模型:资源(资源),为 Move 定义了新的编程模型。资源是一种直接用编程语言表示资产所有权和启用加密数字资产属性的新方法。

关于移动的简

Cadence Design Systems, Inc., 555 River Oaks Parkway, San Jose, CA 95134, USA Trademarks:Trademarks and service marks of Cadence Design Systems, Inc. (Cadence) contained in this document are attributed to Cadence with the appropriate symbol. For queries regarding Cadence’s trademarks, contact the corporate legal department at the address shown above or call 1-800-862-4522. All other trademarks are the property of their respective holders. Restricted Print Permission:This publication is protected by copyright and any unauthorized use of this publication may violate copyright, trademark, and other laws. Except as specified in this permission statement, this publication may not be copied, reproduced, modified, published, uploaded, posted, transmitted, or distributed in any way, without prior written permission from Cadence. This statement grants you permission to print one (1) hard copy of this publication subject to the following conditions: 1. The publication may be used solely for personal, informational, and noncommercial purposes; 2. The publication may not be modified in any way; 3. Any copy of the publication or portion thereof must include all original copyright, trademark, and other proprietary notices and this permission statement; and 4. Cadence reserves the right to revoke this authorization at any time, and any such use shall be discontinued immediately upon written notice from Cadence. Disclaimer: Information in this publication is subject to change without notice and does not represent a commitment on the part of Cadence. The information contained herein is the proprietary and confidential information of Cadence or its licensors, and is supplied subject to, and may be used only by Cadence’s customer in accordance with, a written agreement between Cadence and its customer. Except as may be explicitly set forth in such agreement, Cadence does not make, and expressly disclaims, any representations or warranties as to the completeness, accuracy or usefulness
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值