S
S
Sergey Bubnov2016-10-22 20:19:31
Yandex
Sergey Bubnov, 2016-10-22 20:19:31

What is the difference between Struct and Tuple data types?

The Yandex article about YQL describes the types:

... In addition to simple data types, several types of containers are supported (Optional, List, Dict, Tuple and Struct) ...
. And it’s not clear to me what is the difference between tuple (tuple) and struct (structure in C-like languages ​​or record in Wirth languages).
Here
struct { int id; char[140] msgtext} message; // структура
and here (let message (id msgtext)) ;; tuple в Scheme. There is no fundamental difference, right? Maybe the comrades from Yandex will explain what they mean? I just did not have time to ask a question in the comments to the article, so I'm asking here. KMK, data types are an important thing, and for dummies like me it will be useful to know the subtleties.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question