# Use of \`pointer\`

**URL:** <https://discourse.julialang.org/t/use-of-pointer/8849>\
**Category:** General Usage\
**Created:** [February 2, 2018, 1:58pm UTC](https://discourse.julialang.org/t/use-of-pointer/8849 "2018-02-02T13:58:59Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![foobar\_lv2](https://avatars.discourse-cdn.com/v4/letter/f/ee59a6/32.png) [@foobar\_lv2](https://discourse.julialang.org/u/foobar_lv2)\
**Post date:** [February 2, 2018, 11:40pm UTC](https://discourse.julialang.org/t/use-of-pointer/8849/3 "2018-02-02T23:40:06Z")

</div>

> [@A plea for int overflow checking as the default](https://discourse.julialang.org/t/a-plea-for-int-overflow-checking-as-the-default/3338/65):
>
> It is likely well-past time for the pointer function to be deprecated and removed, but so far not especially high-priority.

No, please, not my pointers! Snippets like the above are invaluable for peeking under the hood and understanding how internals work; and they are useful for interfacing C, and also sometimes nice for performance (even though I understand why you consider `getindex/setindex!` for pointers as too convenient for Base).

I take the segfault before a deprecation every day.

~~, or shall write something to turn more of the obvious ones into throws (we should know at compile-time that Unions cannot be `unsafe_loaded` from a pointer, zero runtime overhead but `unsafe_load` would need to become generated; I don’t see an obvious way to split throw vs pointerref on dispatch).~~

edit: Huh. Apparently `unsafe_load` of unions does make sense sometimes (it assumes a different layout that array elements). So what I proposed can probably not be done; that’s life, this is an easy segfault to avoid.

---

_[View the full topic](https://discourse.julialang.org/t/use-of-pointer/8849)._
