LoginSignup
1
1

More than 1 year has passed since last update.

+ - * / は代数演算子,じゃない

Last updated at Posted at 2021-11-12

Ruby の初心者向け記事で +-*/ を「代数演算子」と書いているものをときどき目にしますが,これらは正しくは「算術演算子」です。英語だと arithmetic operators ですね。

なぜ「代数演算子」という誤った用語が広がっているのか分かりませんが,PHP のリファレンスマニュアルでなぜか「代数演算子」となっているので,PHP 界から Ruby 界に入ってきたのかもしれません:
PHP: 代数演算子 - Manual

上記ページでは冒頭に

学校で習った基礎代数を憶えていますか?

とも書かれています。

この英語版は,タイトルが

Arithmetic Operators ¶

となっており,冒頭の文も

Remember basic arithmetic from school?

です。

単なる誤訳ではないでしょうか。arithmetic と algebraic を混同しているような気がします:

英語 日本語
arithmetic 算術(の)
algebraic 代数の

追記(2022-01-01)

その後,PHP のリファレンスマニュアルは修正されました。
https://github.com/php/doc-ja/pull/30

1
1
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
1
1