# Reading Julia documentation. 1. Reassigning to \`pi\`

**URL:** https://discourse.julialang.org/t/reading-julia-documentation-1-reassigning-to-pi/117016
**Category:** New to Julia
**Tags:** question
**Created:** [July 13, 2024, 8:36pm UTC](https://discourse.julialang.org/t/reading-julia-documentation-1-reassigning-to-pi/117016 "2024-07-13T20:36:43Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![KZiemian](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kziemian/32/9020_2.png) [@KZiemian](https://discourse.julialang.org/u/KZiemian)
#### Post date: [July 13, 2024, 8:36pm UTC](https://discourse.julialang.org/t/reading-julia-documentation-1-reassigning-to-pi/117016/1 "2024-07-13T20:36:43Z")

</div>

I’m just started reading [documentation](https://docs.julialang.org/en/v1/) of Julia and as a result I will write here some questions that are bogging me. I choose this category, because I would probably have many very basic questions.

In the section on [variables](https://docs.julialang.org/en/v1/manual/variables/#man-variables) we read that it is impossible to redefine a built-in constant or function that was already used. As such

```julia
pi
pi = 3

```

isn’t working in REPL. But is working in my Pluto notebook. Can you explain me why Pluto works in such way?

---

<div class="post-metadata">

### Author: ![abraemer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/abraemer/32/51403_2.png) [@abraemer](https://discourse.julialang.org/u/abraemer)
#### Post date: [July 13, 2024, 8:55pm UTC](https://discourse.julialang.org/t/reading-julia-documentation-1-reassigning-to-pi/117016/2 "2024-07-13T20:55:56Z")

</div>

The short answer is that you can redefine constants within Pluto.jl (and thus struct as well).  
This works by some magic that Pluto performs. Essentially every cell is its own namespace and when you use a variable in another cell then Pluto adds the respective namespace to the name behind the scenes. Thus when you “reassign” a constant, in reality Pluto creates a new namespace for that constant and replaces all references to the old namespace by the new namespace.

---

<div class="post-metadata">

### Author: ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)
#### Post date: [July 13, 2024, 9:28pm UTC](https://discourse.julialang.org/t/reading-julia-documentation-1-reassigning-to-pi/117016/3 "2024-07-13T21:28:27Z")

</div>

I do not recommend Pluto for learning Julia, as its disallows variable reassignment between cells while not being able to keep track of changes in mutable structs (including vectors). I recommend using a Jupyter Notebook. I recently had difficulties putting Julia to work in a Jupyter Notebook, so I understand the allure of using Pluto (which is fully written in Julia), but I was able to put it to work in my Arch Linux machine and wrote a step-by-step guide on how to make it work: [Jupyter and Jupytext through IJulia.jl (Jupytext does not really work) - #4 by Henrique\_Becker](https://discourse.julialang.org/t/jupyter-and-jupytext-through-ijulia-jl-jupytext-does-not-really-work/116330/4)

---

<div class="post-metadata">

### Author: ![KZiemian](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kziemian/32/9020_2.png) [@KZiemian](https://discourse.julialang.org/u/KZiemian)
#### Post date: [July 18, 2024, 9:28pm UTC](https://discourse.julialang.org/t/reading-julia-documentation-1-reassigning-to-pi/117016/4 "2024-07-18T21:28:16Z")

</div>

Another gotcha moment for me. I now must rethink the use of Pluto.jl for educational purpose. My impact on Julia education is within statistical error, but I need to have some order in my head about such things.
