# How to delete a function?

**URL:** https://discourse.julialang.org/t/how-to-delete-a-function/108422
**Category:** New to Julia
**Tags:** question, functions
**Created:** [January 6, 2024, 3:26am UTC](https://discourse.julialang.org/t/how-to-delete-a-function/108422 "2024-01-06T03:26:04Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![Benny](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Benny](https://discourse.julialang.org/u/Benny)
#### Post date: [January 6, 2024, 9:20am UTC](https://discourse.julialang.org/t/how-to-delete-a-function/108422/6 "2024-01-06T09:20:27Z")

</div>

> [@heliosdrm](#):
>
> The nearest thing to Matlab’s workspaces in Julia are modules. It is possible to [switch between modules in the REPL](https://docs.julialang.org/en/v1/stdlib/REPL/#Changing-the-contextual-module-which-is-active-at-the-REPL), which is the closest that you’ll get to `clear all` in Matlab

I think MATLAB’s workspaces are [so particular](https://www.mathworks.com/matlabcentral/answers/99602-how-can-i-use-global-variables-and-matlab-workspaces#answer_108950), it’s better to just say they’re different from modules. This discrepancy isn’t by accident, MATLAB’s workspaces in part make some interactive practices like `clear`ing much more feasible, though it’s worth reminding that [MATLAB documentation](https://www.mathworks.com/help/matlab/matlab_prog/techniques-for-improving-performance.html) discourages large `clear`s. As I’ve [written before](https://discourse.julialang.org/t/non-deterministic-memory-allocation/104941/6), we can’t delete global variables without really bad consequences, for the same reason that MATLAB protects global variables into a separate global workspace away from the script’s base workspace.

There’s merit to seeking parallels between MATLAB and Julia functionality, but I think there is also merit to learning a language on its own terms enough to readily identify the reasons a feature is absent. This is just tougher when the languages have more fundamental differences, and MATLAB does many things differently from even other interactive high-level languages, with the exception of its clone Octave.

---

_[View the full topic](https://discourse.julialang.org/t/how-to-delete-a-function/108422)._
