---
title: "reference-book/3-gates/conclusion"
source: reference-book
version: genesis-0-1-0
id: reference-book/3-gates/conclusion
canonical: /docs/reference-book/3-gates/conclusion
---


It's nice to wrap our discussion about gates with some general hints.

- The behavior of Simorg gates is very similar to the logical behavior of any logical gate as in software/electronic engineering. Simorg's gates are in most parts equivalent to their classical counterparts.
- The act of vibration is important for a gate, not the truthy or falsy nature of the vibration. So values like <<<"">>>, <<<0>>>, <<<0x00>>> are considered valid triggers.
  Later, while discussing dataflow operators, we will implement a truthy/falsy check for our Gates. One should not mistake these values for concepts like <<<null>>>, <<<undefined>>>, <<<None>>>, etc. For example, the value <<<"">>> is a valid empty string value which of course is not equivalent to void and nothingness.
- While we can use gates to hold our data, they are more than that. Gates can also define the dependency between multiple vibrations.
  For example, let's see the following code:

```
"Jacob" $name 
21 $age
"Istanbul" $city 

(name, age, city) $userInformation 
```

By using an <<<AND>>> Gate we are implicitly saying <<<userInformation>>> is composed of the must-have fields <<<name>>>, <<<age>>> and <<<city>>>. In other words, <<<userInformation>>> is guaranteed to contain these three fields together across our application whenever it is being vibrated. So in other words, whenever <<<userInformation>>> is vibrated, we are absolutely sure that it will contain <<<name>>>, <<<age>>> and <<<city>>> fields.

## The Scope Of A Gate
Gates have their own scope, meaning if you declare a variable inside a gate then that variable is only valid in that scope. For example,
```
(
  "HELLO" $hello,
  "BYE" $bye
) $message

message?
```
Here two variables are defined under our gate. It's also possible to access the fields using a <<<.>>> operator, 

```
(
  "HELLO" $hello,
  "BYE" $bye
) $message

message.hello?
```

More about <<<.>>> operator later in *IO Wrapper Shells* section. This behavior is quite similar to object fields in **CPL**s.

This topic will be discussed in more detail in the chapter of *Wrapper Shells*, for now it's nice to remember a gate has its own scope and space. We can see gates as a mixture of *object* and *array* concepts. Depending how you use gates, they change their behavior. 

If the gate can relate a slot to an identifier, then accessing that slot using <<<.>>> operator works just fine. It is similar to an object. 
But if you just try to read the value of gate while not caring about the specific identity of data it will be considered similar to an array.

We will see more of this in future examples once we get to know more advanced concepts.
