# Fix constructors functionality

**URL:** <https://forums.unrealengine.com/t/fix-constructors-functionality/1927389>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, fortnite\
**Created:** [July 5, 2024, 11:05am UTC](https://forums.unrealengine.com/t/fix-constructors-functionality/1927389 "2024-07-05T11:05:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GTrovatoES](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GTrovatoES](https://forums.unrealengine.com/u/GTrovatoES)\
**Post date:** [July 5, 2024, 11:05am UTC](https://forums.unrealengine.com/t/fix-constructors-functionality/1927389/1 "2024-07-05T11:05:46Z")

</div>

After looking around in the documentation and experimenting a bit with constructors it seems that constructors cannot do properly what they should do. By definition a constructor is used to create a new instance of a class but there are two major drawbacks which don’t make sense:

- Constructors cannot initialise non public variables since they have to be declared as module function instead of being static functions of a class

```auto
	class1 := class():
# Note that variables with no access specifiers are public by default
	    Property1 : int

	MakeClass1<constructor>(Arg1:int) := class1:
	    Property1 := Arg

```

- Constructors cannot exists in abstract classes as they have to immediately return a type which is not possible for an abstract class

```auto
	class1 := class<abstract>():
	    Property1 : int

# This constructor will throw a compilation error
	MakeClass1<constructor>(Arg1:int) := class1 :
	    Property1 := Arg

```

These are very BIG drawback for something so basic in a programming language, especially as they prevent the very few cases where you want to use a constructor over a plain function for security and inheritance reasons.

Do we know if Epic has any intention of improving this anytime soon?
