5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Ruby と Python は似ているというけれど、設計思想レベルで見るとめちゃめちゃ違う

Last updated at Posted at 2019-03-05

RubyもPythonもスクリプト言語ですし、確かに似ている部分はあります。

しかし、"設計思想"レベルで見てみると大きく違っています。

その違いがとてもおもしろいので紹介したいと思います。

Rubyは自由を好み、Pythonは統一を好む

簡単に言ってしまえば、Rubyは自由を好み、Pythonは統一を好みます。

Pythonはインデントによるdefなどの範囲指定が特徴的ですが、Rubyにはそのような制約はありません。

というのも、
Rubyは「書きたいように書く」というような自由な設計思想があるからです。

それに対し、
Pythonは「誰が書いても同じようなコードになる」というような、統一感を好む設計思想になっています。


このような設計思想を知っていれば各言語の細々とした違いも理解しやすくなります。

他の言語も調べてみると面白いかもしれないですね。

5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?