LoginSignup
15
2

More than 3 years have passed since last update.

Serializeを直列化なんて訳すから分からなくなるんだ

Posted at

Serializeを直列化なんて訳すから分からなくなるんだ

JavaなどにSerializeが実装されていますが、「これ日本語ではなんて言うんですか?」
とエンジニアに効くと、おそらくほとんどの方は「直列化」と答えるのではないかと思います。

ただ、よくよく考えるとこれは妙な訳です。
日本語で「直列」というと、基本的に「並列」と一対の概念で、「直列○○」があったら「並列○○」が存在するのが普通です。

しかし、エンジニアに「Serializeは直列化なんですよね。それならその反対はparallelize(並列化)なんですか?」 と聞くと、
「いや違う。deserialize(非直列化あるいは直列化復元)だ」と答えます。

何なんでしょうこれは。

そもそもSerializeってどういう単語なんだっけ?

serializeという英単語自体にプログラム以外の文脈で振れたことのある方はあまり多くないのではないかと思います。
ただ、分解してみるとすぐになじみのある単語にぶつかります。

series (名詞・カタカナで使われるシリーズ)
↓
serial (seriesの形容詞系・シリアルナンバー などのシリアル)
↓
serialize (serial+ize で動詞化したもの)

要するに、serializeというのはseries化するという英単語ということですね。

ではなぜ、これが直列化するという訳になるのか?
それは、seriesという英単語がカタカナで日本語に定着している「シリーズ」よりも広い概念で、
電気回路などの「直列」の意味を持っているからです。(英語で直列回路はseries circuitです。)
つまり、seriesの一部の「直列」に当たる部分として訳すとserialize = 直列化という図式が出来るわけですね。

Serialize=直列化で一対一なのか?

seriesという単語が「直列」の意味を含んでいて、serializeはその派生語のため「直列化」の意味にもなりうるということはわかりました。
では、serialize=直列化の図式は常に成り立つのでしょうか?
これに関しては明確にNoです。
例えば、英英辞典でSerializeを確かめてみると、以下の解説が出てきます。

to print or broadcast a story in several separate parts

この場合、日本語としては「連載する」とか「シリーズ化する」と言った意味合いです。
つまり、serializeというのは文字通りseries化することを意味しており、かなり幅の広いseriesという単語の守備範囲のうちどこを指しているのかは、文脈から判断しなければならないということです。

seriesという単語の守備範囲

seriesという言葉は「連続して続くこと・もの」を指します。
参考:
https://eng-etymo.com/archives/4513
https://ejje.weblio.jp/content/series

この概念を電気回路や並列処理の文脈に適用すれば「直列」と言うことになりますし、
採番に適用してSerialNumberとすると通し番号と言うことになります。

それでは、プログラムにおけるSerializeはどのような文脈なのか?
英語版Wikipediaで確認してみましょう

In computer science, in the context of data storage, serialization (or serialisation) is the process of translating data structures or object state into a format that can be stored (for example, in a file or memory buffer) or transmitted (for example, across a network connection link) and reconstructed later (possibly in a different computer environment).[1] When the resulting series of bits is reread according to the serialization format, it can be used to create a semantically identical clone of the original object. For many complex objects, such as those that make extensive use of references, this process is not straightforward. Serialization of object-oriented objects does not include any of their associated methods with which they were previously linked.

This process of serializing an object is also called marshalling an object.[2] The opposite operation, extracting a data structure from a series of bytes, is deserialization (also called unmarshalling).

この中でseries系の単語が使われている部分は以下の2か所です。

When the resulting series of bits is reread according to the serialization format,

The opposite operation, extracting a data structure from a series of bytes,

それぞれ、
「(Serializationの)結果のビット列(series of bits)がSerializationの形式に則て再読み込みされた場合」
「(Serializationの)反対の処理、すなわちバイト配列(series of bytes)から構造を抽出すること」
と言ったところでしょうか。

要するにこの場合のSerializeはビットないしバイト「列」(series)化するという意味です。
「直列化」でも間違ってはいないのかも知れませんが、素直に「バイト列化」あたりに訳した方が意味が通りやすいと思います。

まとめ

  • JavaなどにおけるSeriazlize=バイト列化する
  • 英語=日本語で一対一だと思って訳すと守備範囲が異なる単語で変な訳になる
15
2
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
15
2