Ruby 更像 Perl 还是 Python?
经常看到ruby和python在一起被比较,也有人说ruby是更像perl和python的结合体,那么ruby更像python还是perl呢?
回复内容:
看 matz 是怎么说的:http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/179642Ruby is a language designed in the following steps:
* take a simple lisp language (like one prior to CL).
* remove macros, s-expression.
* add simple object system (much simpler than CLOS).
* add blocks, inspired by higher order functions.
* add methods found in Smalltalk.
* add functionality found in Perl (in OO way).
So, Ruby was a Lisp originally, in theory.
Let's call it MatzLisp from now on. ;-)
所以你看,它都没有提到 python。Ruby 主要是受 lisp, Smalltalk 和 perl 影响。
之所以称为Ruby是取法自Perl,因为Perl的发音与6月的诞生石pearl(珍珠)相同,Ruby选择以7月的诞生石ruby(红宝石)命名
Perl 6的开发者的唐凤(Autrijus / Audrey)说:“Ruby就是‘没有到处打广告的Perl 6’”。
Ruby之父松本行弘在接受欧莱礼(O'Reilly)访问时,提到“Ruby借用了很多Perl的东西……,Python远比Perl要少……”、“我认为Ruby这个名字作为Perl之后的一门语言的名字真是再恰当不过了。from: Ruby 更像Perl 更像Perl,用用就知道 这个问题就好比,“ 你更像你父母中的哪一位”
Perl之父拉里·沃尔(Larry Wall)说:“很多方面上我还是很喜欢Ruby的,这是因为那些部分是从Perl借过去的。:-)”、“我还喜欢Ruby的C一元星号操作符,所以我把它加到Perl 6里面。
你就是你, Ruby就是Ruby。 ruby只是借用了别人好的地方。没有发现特别像哪个语言。 当然是perl了, 如果像python, 那么.....

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

To run Python code in Sublime Text, you need to install the Python plug-in first, then create a .py file and write the code, and finally press Ctrl B to run the code, and the output will be displayed in the console.

PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.

Python is more suitable for beginners, with a smooth learning curve and concise syntax; JavaScript is suitable for front-end development, with a steep learning curve and flexible syntax. 1. Python syntax is intuitive and suitable for data science and back-end development. 2. JavaScript is flexible and widely used in front-end and server-side programming.

Golang is better than Python in terms of performance and scalability. 1) Golang's compilation-type characteristics and efficient concurrency model make it perform well in high concurrency scenarios. 2) Python, as an interpreted language, executes slowly, but can optimize performance through tools such as Cython.

Writing code in Visual Studio Code (VSCode) is simple and easy to use. Just install VSCode, create a project, select a language, create a file, write code, save and run it. The advantages of VSCode include cross-platform, free and open source, powerful features, rich extensions, and lightweight and fast.

Running Python code in Notepad requires the Python executable and NppExec plug-in to be installed. After installing Python and adding PATH to it, configure the command "python" and the parameter "{CURRENT_DIRECTORY}{FILE_NAME}" in the NppExec plug-in to run Python code in Notepad through the shortcut key "F6".
