# Missed the WAT thread, so here's one for intentionally cursed code

**URL:** <https://discourse.julialang.org/t/missed-the-wat-thread-so-heres-one-for-intentionally-cursed-code/114446>\
**Category:** Offtopic\
**Tags:** joke\
**Created:** [May 19, 2024, 4:40am UTC](https://discourse.julialang.org/t/missed-the-wat-thread-so-heres-one-for-intentionally-cursed-code/114446 "2024-05-19T04:40:02Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [May 22, 2024, 3:39am UTC](https://discourse.julialang.org/t/missed-the-wat-thread-so-heres-one-for-intentionally-cursed-code/114446/12 "2024-05-22T03:39:45Z")

</div>

This is known and intentional, see

> [@Hide default constructor for a struct](https://discourse.julialang.org/t/hide-default-constructor-for-a-struct/89064/11):
>
> Not a bug. The struct has local scope and you can evaluate arbitrary code inside to define ways to construct objects of the type. The most common way to do this is to add methods to the type object itself, but you can do other things as well, eg define a single globally bound instance or a global function by another name that constructs them. If there is any code in a strict you don’t get a default constructor.

but I am not sure it is mentioned in the manual.

---

_[View the full topic](https://discourse.julialang.org/t/missed-the-wat-thread-so-heres-one-for-intentionally-cursed-code/114446)._
