> I was wondering if there is an argument against using initialize ==
> true in all cases?

Here are a couple of examples, in the strictly java world (java
programming language and vm) when you want initialize to be false.

The idiomatic use case being byte code analysis
* FindBugs
* Code obfuscators

In these cases you do not want the static block to execute.

Thanks
Bhaskar

On Sun, Oct 26, 2008 at 11:50 AM, Rich Hickey <[EMAIL PROTECTED]> wrote:
>
>
>
> On Oct 26, 11:18 am, "Stephen C. Gilardi" <[EMAIL PROTECTED]> wrote:
>> RT/classForName currently hardwires the "initialize" option of
>> Class.forName to false. In working with jdbc drivers, the need to
>> initialize classes in some circumstances came up--in some JRE
>> configurations, the driver class needs to be initialized explicitly to
>> work.
>>
>> I don't understand all the subtleties of class loading, but I gather
>> from previous discussions here that it's good practice for Clojure to
>> provide a class loader and for Clojure code to use it in the absence
>> of a compelling reason not to. Use of Class.forName directly is (at
>> least mildly) discouraged.
>>
>> To address both of those concerns, classForName-initialize.patch
>> (uploaded to the group and in-line below) changes RT.java to expose an
>> optional "initialize" flag for RT/classForName.
>>
>> After the change, existing calls to RT/classForName will work as they
>> always have, but callers that need to ensure the class is initialized
>> are now able to.
>>
>
> I was wondering if there is an argument against using initialize ==
> true in all cases?
>
> Rich
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to