# Outer constructor not getting called despite being in stack trace?

**URL:** <https://discourse.julialang.org/t/outer-constructor-not-getting-called-despite-being-in-stack-trace/103801>\
**Category:** New to Julia\
**Tags:** constructors\
**Created:** [September 13, 2023, 4:52am UTC](https://discourse.julialang.org/t/outer-constructor-not-getting-called-despite-being-in-stack-trace/103801 "2023-09-13T04:52:40Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![deaminase](https://avatars.discourse-cdn.com/v4/letter/d/b2d939/32.png) [@deaminase](https://discourse.julialang.org/u/deaminase)\
**Post date:** [September 13, 2023, 6:23am UTC](https://discourse.julialang.org/t/outer-constructor-not-getting-called-despite-being-in-stack-trace/103801/3 "2023-09-13T06:23:29Z")

</div>

Ohhh I didn’t even think to just provide the parameter type in the outer constructor as well. What I ended up doing was just defining an inner constructor with all the type parameters present, but it feels a bit redundant since it doesn’t really “do” anything like check argument validity etc.

I didn’t want to make the parameterless constructor an inner constructor since I’ll also want to provide at least a `State{InpIterState}(inp,is::Optional{InpIterState})` as well, and I’ve understood that generally you’d only want one inner constructor. Then again, I seem to follow best practices pretty selectively since apparently using constructors to provide default type parameters like I’ve been doing and was planning to do with `State{InpIterState}(inp,is)` is somewhat inadvisable as well due to some potential ambiguities (see [this comment](https://discourse.julialang.org/t/type-system-abuse-advisability-of/103390/9))

---

_[View the full topic](https://discourse.julialang.org/t/outer-constructor-not-getting-called-despite-being-in-stack-trace/103801)._
