# One feature we could learn from Matlab?

**URL:** <https://discourse.julialang.org/t/one-feature-we-could-learn-from-matlab/79965>\
**Category:** Internals & Design\
**Tags:** question\
**Created:** [April 25, 2022, 12:54am UTC](https://discourse.julialang.org/t/one-feature-we-could-learn-from-matlab/79965 "2022-04-25T00:54:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![leon](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@leon](https://discourse.julialang.org/u/leon)\
**Post date:** [April 25, 2022, 12:54am UTC](https://discourse.julialang.org/t/one-feature-we-could-learn-from-matlab/79965/1 "2022-04-25T00:54:05Z")

</div>

I really like how Matlab can automatically load some types of files into its memory. For example, if I have a MAT file, I can just drag and drop it into Matlab, that’s all it takes to load the file into Matlab. By typing `whos`, I can see all of the stored variables.

I wonder if Julia can do the same thing?

---

<div class="post-metadata">

**Author:** ![gustaphe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gustaphe/32/18174_2.png) [@gustaphe](https://discourse.julialang.org/u/gustaphe)\
**Post date:** [April 25, 2022, 3:58am UTC](https://discourse.julialang.org/t/one-feature-we-could-learn-from-matlab/79965/2 "2022-04-25T03:58:47Z")

</div>

> **[GitHub - JuliaIO/JLD.jl: Saving and loading julia variables while preserving...](https://github.com/JuliaIO/JLD.jl)**
>
> Saving and loading julia variables while preserving native types - GitHub - JuliaIO/JLD.jl: Saving and loading julia variables while preserving native types

---

<div class="post-metadata">

**Author:** ![gustaphe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gustaphe/32/18174_2.png) [@gustaphe](https://discourse.julialang.org/u/gustaphe)\
**Post date:** [April 25, 2022, 4:00am UTC](https://discourse.julialang.org/t/one-feature-we-could-learn-from-matlab/79965/3 "2022-04-25T04:00:36Z")

</div>

Actually it seems this one is better:

> **[GitHub - JuliaIO/JLD2.jl: HDF5-compatible file format in pure Julia](https://github.com/JuliaIO/JLD2.jl)**
>
> HDF5-compatible file format in pure Julia. Contribute to JuliaIO/JLD2.jl development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [April 26, 2022, 12:35am UTC](https://discourse.julialang.org/t/one-feature-we-could-learn-from-matlab/79965/4 "2022-04-26T00:35:03Z")

</div>

The `varinfo` function used to be called `whos` but at some point we realized that was a terrible name and changed it.

---

<div class="post-metadata">

**Author:** ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Post date:** [April 26, 2022, 5:04am UTC](https://discourse.julialang.org/t/one-feature-we-could-learn-from-matlab/79965/5 "2022-04-26T05:04:39Z")

</div>

And I’d imagine supporting drag-and-drop will be hard / difficult because Julia is not an IDE. However, it might be able to support it for some terminals / front ends perhaps (if we would want to).

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [April 26, 2022, 7:47am UTC](https://discourse.julialang.org/t/one-feature-we-could-learn-from-matlab/79965/6 "2022-04-26T07:47:13Z")

</div>

The drag-and-drop part indeed requires some kind of GUI that can detect the drag-and-drop event. The way it’s handled in Matlab, or at least was ten years ago, is that the drag-and-drop event is converted into a global scope function call to `uiopen`, with the filename as argument. Depending on the file type this is in turn dispatched to a number of different functions and you can also intercept the `uiopen` call with your own function if you engineer the function search path appropriately.
