I was wondering if it is possible in julia to assign a custom variable or an existing type without calling the constructor.
Something like direct class declaration in C ++.
Here is an example of what I intend to achieve:
type foo a end
Change To clarify my question:
In C ++ or Fortran, a common coding practice declares a variable at some point for later use.
I donβt remember the correct Fortran syntax, but in C ++ you would write something like:
class foo; class bar; int a; class foo{ private: bar myBar; public: foo(int a){ myBar( a ); } } class bar{ public: bar(int a){ std::cout << a << std::endl; } } a = 3; foo( a );
The advantage of this code structure is that it allows you to define objects / types / variables before using them.
source share