Maybe a solution to this kind of design problem would be to allow multiple 
top-level modules per package, with syntax to let you load the particular 
one you want/need.

On Thursday, February 25, 2016 at 1:10:28 AM UTC-5, John Myles White wrote:
>
> I don't think Julia is really amenable to this kind of organization 
> because Julia's modules have no logical relationship to filesystem layouts, 
> whereas Python's system is all about filesystem layout and has nothing to 
> do with textual inclusion.
>
> On Wednesday, February 24, 2016 at 1:28:08 PM UTC-8, Cedric St-Jean wrote:
>>
>>
>>
>> On Wednesday, February 24, 2016 at 4:15:49 PM UTC-5, Jeffrey Sarnoff 
>> wrote:
>>>
>>> This should not be a problem.  What is your concern?
>>>
>>
>> Loading time/RAM usage. I'm trying to wrap/port scikit-learn, and their 
>> module arrangement makes a lot of sense. In Python, I don't get to load 
>> code for support vector machines unless I actually need them.
>>
>> import sklearn.svm
>>
>> I could define separate modules like "sklearn_svm", "sklearn_cluster", 
>> but it's awfully ugly.
>>  
>>
>>> On Wednesday, February 24, 2016 at 3:45:50 PM UTC-5, Cedric St-Jean 
>>> wrote:
>>>>
>>>> In Python, loading a module (i.e. importing a file) does not load 
>>>> sub-modules, eg.:
>>>>
>>>> import sklearn
>>>> import sklearn.linear_model
>>>>
>>>> Is there any way to achieve the same thing in Julia?
>>>>
>>>> module A
>>>> println("loaded A")
>>>>
>>>> module B
>>>> println("loaded B")
>>>> end
>>>>
>>>> end
>>>>
>>>> Can I have "loaded A" without "loaded B"?
>>>>
>>>

Reply via email to