ruby

Ruby is an object-oriented programming language developed by Yukihiro Matsumoto. Ruby is a dynamic programming language with a complex but at the same time expressive grammar. Ruby also has a core class library with a rich and powerful API.

Ruby是由Yukihiro Matsumoto开发的一种面向对象的编程语言。 Ruby是一种动态编程语言 ,具有复杂但同时具有表现力的语法 。 Ruby还具有一个核心类库,该库具有丰富而强大的API。

Ruby is inspired by other low level and object oriented programming languages like Lisp, Smalltalk, and Perl and uses syntax that is easy for C and Java programmers to learn.

Ruby受到LispSmalltalkPerl等其他面向对象的低级编程语言的启发,并且使用的语法易于C和Java程序员学习。

Ruby, a dynamic and open source programming language with a focus on simplicity and productivity, has an elegant syntax that is natural to read and easy to write.

Ruby是一种动态且开源的编程语言,其重点是简单性和生产率,它具有优雅的语法,易于阅读和编写。

Although it's easy to program in Ruby, it is not a simple language.

尽管使用Ruby编程很容易,但它不是一种简单的语言。

Ruby的功能 (Features of Ruby)

  1. Object Oriented : Every values in Ruby is an object, even the most primitive things like strings, numbers and even true and false. So, Ruby is a pure Object Oriented Language. Every object has a class and every class has one superclass.

    面向对象: Ruby中的每个值都是一个对象,即使是最原始的东西,例如字符串,数字,甚至是true和false。 因此,Ruby是一种纯粹的面向对象语言。 每个对象都有一个类,每个类都有一个超类。

  2. Dynamic : Ruby is a very dynamic programming language. Ruby programs aren't compiled like C or Java programs. All things in a program are built by the code when it is run. A program can also modify its own definitions while running.

    动态: Ruby是一种非常动态的编程语言。 Ruby程序不能像C或Java程序那样进行编译。 程序中的所有内容都是在运行时由代码构建的。 程序在运行时还可以修改自己的定义。

  3. Singleton Classes : Every object in Ruby has two classes: a regular class and a singleton class. An object's singleton class is nameless class whose only instances is that object. Singleton classes are created automatically and make Ruby simple and elegant.

    单例类: Ruby中的每个对象都有两个类: regular classsingleton class 。 对象的单例类是无名类,其唯一实例是该对象。 Singleton类是自动创建的,使Ruby简单而优雅。

  4. Metaprogramming : Everything in Ruby are objects. You can use them to learn about them or even modify them, while your program is running. This technique is called metaprogramming.

    元编程: Ruby中的一切都是对象。 您可以在程序运行时使用它们来了解它们,甚至可以对其进行修改。 这种技术称为元编程。

  5. Flexibility : Methods can be added to existing classes without sub classing, operators can be overloaded, and even the behaviour of the standard library can be redefined at runtime.

    灵活性:无需子类就可以将方法添加到现有类中,可以重载运算符,甚至可以在运行时重新定义标准库的行为。

  6. Variables and scopes : Programmer do not need to declare variables or variable scope in ruby. The name of the variable automatically determines its scope.

    变量和范围:程序员无需在ruby中声明变量或变量范围。 变量的名称自动确定其范围。

    Examples :
    var is a local variable.
    $var is a global variable.
    @var is an instance variable.
    @@var is a class variable.
    例子 :
    var是局部变量。
    $var是全局变量。
    @var是一个实例变量。
    @@var是一个类变量。

Ruby:高级功能 (Ruby: Advanced Features)

  • Exceptions for handling errors.

    处理错误的异常。

  • Garbage Collector.

    垃圾收集器。

  • OS - independent threading, which allows you to write multi-threaded applications even on operating systems such as DOS.

    操作系统-独立的线程,即使在DOS等操作系统上,也可以编写多线程应用程序。

  • You can write extensions to Ruby in C.

    您可以在C中为Ruby编写扩展。

为什么要去Ruby? (Why you should go for Ruby?)

  • Ruby is a server-side scripting language.

    Ruby是一种服务器端脚本语言。

  • Ruby can be embedded into HTML.

    Ruby可以嵌入到HTML中。

  • Ruby has similar syntax to that of many programming languages like C and Java.

    Ruby的语法与C和Java等许多编程语言的语法相似。

  • Ruby supports mostly all the platforms like Windows, Mac and Linux.

    Ruby几乎支持所有平台,例如Windows,Mac和Linux。

  • Ruby can be easily connected to Oracle, MySQL, DB2.

    Ruby可以轻松连接到Oracle,MySQL,DB2。

翻译自: https://www.studytonight.com/ruby/introduction-to-ruby

ruby

ruby_Ruby简介相关推荐

  1. etcd 笔记(01)— etcd 简介、特点、应用场景、常用术语、分布式 CAP 理论、分布式原理

    1. etcd 简介 etcd 官网定义: A highly-available key value store for shared configuration and service discov ...

  2. Docker学习(一)-----Docker简介与安装

    一.Docker介绍 1.1什么是docker Docker是一个开源的应用容器引擎,基于Go语言并遵从Apache2.0协议开源 Docker可以让开发者打包他们的应用以及依赖包到一个轻量级,可移植 ...

  3. 【Spring】框架简介

    [Spring]框架简介 Spring是什么 Spring是分层的Java SE/EE应用full-stack轻量级开源框架,以IOC(Inverse Of Control:反转控制)和AOP(Asp ...

  4. TensorRT简介

    TensorRT 介绍 引用:https://arleyzhang.github.io/articles/7f4b25ce/ 1 简介 TensorRT是一个高性能的深度学习推理(Inference) ...

  5. 谷粒商城学习笔记——第一期:项目简介

    一.项目简介 1. 项目背景 市面上有5种常见的电商模式 B2B.B2C.C2B.C2C.O2O B2B 模式(Business to Business),是指商家和商家建立的商业关系.如阿里巴巴 B ...

  6. 通俗易懂的Go协程的引入及GMP模型简介

    本文根据Golang深入理解GPM模型加之自己的理解整理而来 Go协程的引入及GMP模型 一.协程的由来 1. 单进程操作系统 2. 多线程/多进程操作系统 3. 引入协程 二.golang对协程的处 ...

  7. Linux 交叉编译简介

    Linux 交叉编译简介 主机,目标,交叉编译器 主机与目标 编译器是将源代码转换为可执行代码的程序.像所有程序一样,编译器运行在特定类型的计算机上,输出的新程序也运行在特定类型的计算机上. 运行编译 ...

  8. TVM Operator Inventory (TOPI)简介

    TOPI简介 这是 TVM Operator Inventory (TOPI) 的介绍.TOPI 提供了比 TVM 具有更高抽象的 numpy 风格的,通用操作和调度.TOPI 如何在 TVM 中,编 ...

  9. 计算机视觉系列最新论文(附简介)

    计算机视觉系列最新论文(附简介) 目标检测 1. 综述:深度域适应目标检测标题:Deep Domain Adaptive Object Detection: a Survey作者:Wanyi Li, ...

  10. 2021年大数据ELK(二十三):Kibana简介

    全网最详细的大数据ELK文章系列,强烈建议收藏加关注! 新文章都已经列出历史文章目录,帮助大家回顾前面的知识重点. Kibana简介 通过上面的这张图就可以看到,Kibana可以用来展示丰富的图表. ...

最新文章

  1. python3 异步 asyncio get_event_loop new_event_loop 使用
  2. 接口测试用例_【学习】接口测试用例编写和测试关注点
  3. 计算机不让爱奇艺显示在桌面,怎么让爱奇艺图标不在我的电脑里显示
  4. java启动scrapy爬虫,爬虫入门之Scrapy 框架基础功能(九)详解
  5. spark学习-74-源代码:Endpoint模型介绍(6)-Endpoint的消息的接收
  6. 前台js获取url传递参数(后台Request.QueryString接收)
  7. ASP.NET生成日历
  8. Spring Boot ContentNegotiation 内容协商
  9. 小程序软件有必要申请软件著作权登记么?
  10. 终于有人把p值讲明白了
  11. 分数统计设计java程序_(windows综合程序)设计一个学生平时成绩统计软件 最后的Java作业...
  12. C# DevExpress控件Gridview和GridControl学习总结
  13. 国内NFT市场风起云涌,梦幻岛如何走出突围之路
  14. 最大加权矩形 压缩+前缀和+dp
  15. 【观察】从鞍钢数字化转型升级,看如何打造智能制造数据坚实底座?
  16. 直饮加热一体机哪个牌子好,净水器科普
  17. FreeBSD软件安装 命令pkg
  18. 程序员修炼之道(通俗版)——第一章
  19. 如何利用windows自带的矢量字库提取字模
  20. 一周极客热文:微软将推新编程语言M#:系统编程级别的C#

热门文章

  1. songshu-video-uniapp-YYC松鼠短视频前端源码-开源--优雅草科技官方发布
  2. ubuntu Rhythmbox 乱码解决
  3. Python教你一键获得【王者荣耀全皮肤】~~~
  4. 库和计算机硬盘什么区别是什么,电脑内存和硬盘容量的区别是什么
  5. DH坐标系的建立与DH表—机器人学
  6. python 椭圆曲线dh密钥交换_密钥交换之DH算法
  7. C#工具栏的各种工具
  8. C语言将十进制输出二进制、八进制、十六进制的方法总结
  9. Java面试题(一)
  10. 解读神经网络十大误解,再也不会弄错它的工作原理