I have checked julia git, but some questions still remain. Should I use module as class substitution? (Every global variable in module is encapsulated. Same for function unless one uses export). In that case where is my constructor?
In OO languages you know exactly what methods every object has (in IDE you can use CTRL+Space). How can I do that, or should I need to do that in julia? Let's say I create a module called Apple, with methods taste() and size(), and somebody wants to use that module. Methods taste() and size() are obviously just getters for variables that are somehow stored in Apple module. The user should be never able to change size and taste of apple by himself, those values will be randomly set when constructor is called. How do I encapsulate those two variables? Where do I store those two variables (If I store them in type, user must be able to pass that type into Apple methods, thus he can just do AppleType.size = 6). How do I call constructor if variables are not stored in type? Note: I don't want to have immutable AppleType!
