# Hello World: .save / @ and & / log() in prepare block

**URL:** <https://forum.flow.com/t/hello-world-save-and-log-in-prepare-block/946>\
**Category:** 🏄🏻‍♀️ Cadence\
**Created:** [February 16, 2021, 5:25pm UTC](https://forum.flow.com/t/hello-world-save-and-log-in-prepare-block/946 "2021-02-16T17:25:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![juyeon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/juyeon/32/273_2.png) [@juyeon](https://forum.flow.com/u/juyeon)\
**Post date:** [February 16, 2021, 5:25pm UTC](https://forum.flow.com/t/hello-world-save-and-log-in-prepare-block/946/1 "2021-02-16T17:25:37Z")

</div>

Hi, I have several questions with Cadence Tutorial - Hello World.

Q1.  
Do I always need to use `save` function to store objects in storage? I thought I can store every objects in my contract and doing it by using `save`. But it can be a little bit hard work to `save` everything if there’s many objects in my contract.

So I’m wondering if it’s impossible to store objects in storage without `save` function, and why this process (use this function to save objects in storage) is designed in Cadence.

Q2.  
What is difference with “@” and “&”?  
I found “@” at `acct.load<@HelloWorld.HelloAsset>`  
and “&” at  
`helloCapability!.borrow<&HelloWorld.HelloAsset>`  
`account.link<&HelloWorld.HelloAsset>`

I guess both mean PATH, and differences are made from the types of functions(such as `load`, `link` and `borrow`) used…? Do I understand well?

Q3.  
Why does tutorial use `log` function in prepare block? I thought prepare block is to get access by using AuthAccount and manage everything associated with storage (e.g. `load`, `link` function). And using execute block to “execute” something like `log`.

---

<div class="post-metadata">

**Author:** ![bastian](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/bastian/32/183_2.png) [@bastian](https://forum.flow.com/u/bastian)\
**Post date:** [February 16, 2021, 6:35pm UTC](https://forum.flow.com/t/hello-world-save-and-log-in-prepare-block/946/2 "2021-02-16T18:35:44Z")

</div>

## Q1: Do I always need to use save function to store objects in storage?

> I thought I can store every objects in my contract and doing it by using save. But it can be a little bit hard work to save everything if there’s many objects in my contract.

You can declare fields in contracts, and as contract are stored in accounts, these fields are automatically stored in the account. You can still use the save function in a a contract.

In general, try to store large objects in separate storage paths.

The save function also allows storing data in the account without having any contracts deployed to it.

* * *

## Q2: What is difference with “@” and “&”?

`@` indicates that the type is a resource, see the documentation at [Flow Developer Portal](https://docs.onflow.org/cadence/language/composite-types/#resources:)

> To make the usage and behaviour of resource types explicit, the prefix @ must be used in type annotations of variable or constant declarations, parameters, and return types.

* * *

## Q3. Why does tutorial use `log` function in prepare block?

The log function is used in the prepare block just as an example, to show that the `prepare` block is executed. The log function can be used anywhere for debugging purposes, and is not essential / required.
