网站大量收购独家精品文档,联系QQ:2885784924

Rust教程(翻译).docVIP

  1. 1、本文档共106页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
  5. 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
  6. 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们
  7. 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
  8. 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
Rust教程(翻译)

The Rust Language Tutorial 目录 1.Introduction(介绍) 2.Getting started(开始) 3.Syntax basics(基础语法) 4.Control structures(控制结构) 5.Data structures(数据结构) 6.Functions(函数) 7.Destructors(析构函数) 8.Ownership(所有权) 9.Boxes(盒子) 10.Move semantics(所有权转移语义) 11.Borrowed pointers(借贷指针) 12.Dereferencing pointers(解引用指针) 13.Vectors and strings(容器和字符串) 14.Closures(闭包) 15.Methods(方法) 16.Generics(泛型) 17.Modules and crates(模块和箱子) 18.What next?(下一步?) 1.Introduction Rust is a programming language with a focus on type safety, memory safety, concurrency and performance.(Rust是一个关注类型安全、内存安全、并发和性能的编程语言) It is intended for writing large-scale, high-performance software that is free from several classes of common errors.(它的目标是让大规模、高性能软件的编写免于几类常见错误。) Rust has a sophisticated memory model that encourages efficient data structures and safe concurrency patterns, forbidding invalid memory accesses that would otherwise cause segmentation faults. (Rust拥有精良的内存模型,鼓励高效数据结构和安全并发模式的使用,禁止对无效内存的访问,否则会造成段错误。)It is statically typed and compiled ahead of time.(它是需要预先编译的静态类型语言。) As a multi-paradigm language, Rust supports writing code in procedural, functional and object-oriented styles. Some of its pleasant high-level features include:(Rust是一个多范式语言,支持面向过程、函数式和面向对象多种风格的代码。包含的高级特性如下:) Type inference. Type annotations on local variable declarations are optional.(类型推导:申明局部变量时,类型注释是可选的。) Safe task-based concurrency. Rusts lightweight tasks do not share memory, instead communicating through messages.(安全的基于任务的并发:Rust的轻量级任务通过消息进行通信而不共享内存。) Higher-order functions. Efficient and flexible closures provide iteration and other control structures(高阶函数:高效和灵活的闭包,以提供迭代和其他控制结构使用。) Pattern matching and algebraic data types. Pattern matching on Rusts enumeration types (a more powerful version of Cs enums, similar to algebraic data types in functional languages) is a compact and expressive way to encode program logic.(模式匹配和代数数据类型:在Rust的枚举数据类型(一个比C的枚举类型更强大的版本,类似于函数式编程里的代数数据类型)上使用模式匹配是一种紧凑而更具表达性的程序逻辑表达方式。) Polymorphism. Rust has

文档评论(0)

panguoxiang + 关注
实名认证
文档贡献者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档