it's been an odd day, hence the slightly bent (or completely broken) humor.
true. i'm not really criticizing CF's practices. personally, i believe that it should provide the default behavior of being shared scope safe, while allowing the programmer granular control over said behavior. of course, i always want my cake and eat it too. it's not too onerous to have to handle locking myself. just commenting on compiler/interpreter construction. christopher olive cto, vp of web development, vp it security atnet solutions, inc. 410.931.4092 http://www.atnetsolutions.com -----Original Message----- From: Dave Watts [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 11:26 AM To: CF-Talk Subject: RE: locking (was: UDF question) > despite the fact that you're not raymond, i'll respond > to him via your response for him (how's it feel to be a > surrogate ray? :)) I refuse to answer that question because, well, it's kind of weird. > "I don't think that's what Ray meant. If I understand > correctly, his distinction was that the programmer can > place multiple variable accesses in a single scope within > a single CFLOCK - and can structure his code accordingly > - while the stupid computer can't do that: > > . begin automatic lock ... > <cfset Session.foo = "bar"> > . end automatic lock ... > . begin automatic lock ... > <cfset Session.foo2 = "baz"> > . end automatic lock ... > > vs > > <cflock scope="session" ...> > <cfset Session.foo = "bar"> > <cfset Session.foo2 = "baz"> > </cflock>" > > of course, that's the point of a well written > compiler/interpreter. it can figure out that it's SUPPOSED > to do the second. that's what makes it well written. Of course, though, there are limitations to what a well-written compiler or interpreter can do. While my specific example, chosen primarily for its simplicity, may be easy to work into the CF Server's interpretational abilities, the fact is that anything more complex than that could be difficult. For example, I can look at an individual script and make the determination that, for this script, I can copy some set of variables from persistent to local scope, including some that may not even be used based on the evaluation of a condition within the page, within a single CFLOCK, while if those variables are currently scattered throughout the page, the interpreter may not be able to make that decision. Even in environments which do take care of things like this automatically, by default, those environments provide a way to manually override the default. For example, within the database, you can use isolation levels and locking hints to override the default locking. Within Java and other languages which perform automatic garbage collection, the programmer can write code to affect the behavior of that garbage collection. So, you may be able to criticize CF for not providing that default behavior, but you can't follow the assumption that if it did, you wouldn't have to worry about the issue any more. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ______________________________________________________________________ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists