<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>SimpleScript Part One: DllMain is Boring</title><link>http://blogs.msdn.com/ericlippert/archive/2004/03/31/105329.aspx</link><description>In talking with our support engineer it's just become more muddled. I'm pretty sure now actually that the customer does not want to build a script engine, but whether they want to build a script editor, a script host or a script debugger is unclear. Before</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Why not use ATL?</title><link>http://blogs.msdn.com/ericlippert/archive/2004/03/31/105329.aspx#105635</link><pubDate>Thu, 01 Apr 2004 15:22:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:105635</guid><dc:creator>John Stanhope</dc:creator><description>Title says it all.</description></item><item><title>re: SimpleScript Part One: DllMain is Boring</title><link>http://blogs.msdn.com/ericlippert/archive/2004/03/31/105329.aspx#105636</link><pubDate>Thu, 01 Apr 2004 15:19:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:105636</guid><dc:creator>J. Daniel Smith</dc:creator><description>I don't think I'm ever going to have a need for writing my own script engine, but I'm going to enjoy reading your adventures over the next weeks/months.  Especially if at the end of the day you try to do this in C# too.&lt;br&gt;&lt;br&gt;</description></item><item><title>re: SimpleScript Part One: DllMain is Boring</title><link>http://blogs.msdn.com/ericlippert/archive/2004/03/31/105329.aspx#105704</link><pubDate>Thu, 01 Apr 2004 16:29:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:105704</guid><dc:creator>Eric Lippert</dc:creator><description>&amp;gt; Why not use ATL?  &lt;br&gt;&lt;br&gt;You obviously haven't been reading this blog very long!&lt;br&gt;&lt;br&gt;I am not a big fan of ATL.  I understand COM, I'm good at writing COM programs, and I don't like the abstraction that ATL provides.  I don't like the way it adds new syntax to C++, I don't like smart pointers, I don't like templates, I don't like debugging ATL memory leaks through a dozen indirection layers.  &lt;br&gt;&lt;br&gt;Read my past entries in the AAARGH! series or, way back, the &amp;quot;Smart pointers are too smart&amp;quot; entry for more details.&lt;br&gt;</description></item><item><title>re: SimpleScript Part One: DllMain is Boring</title><link>http://blogs.msdn.com/ericlippert/archive/2004/03/31/105329.aspx#105725</link><pubDate>Thu, 01 Apr 2004 16:54:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:105725</guid><dc:creator>Mike Raiford</dc:creator><description>Just an observation:&lt;br&gt;&lt;br&gt;I know many programmers say goto is evil, but, I think you have shown a purpose for it's existence. &lt;br&gt;&lt;br&gt;It really cleaned up the error handling where it was used. </description></item><item><title>re: SimpleScript Part One: DllMain is Boring</title><link>http://blogs.msdn.com/ericlippert/archive/2004/03/31/105329.aspx#105730</link><pubDate>Thu, 01 Apr 2004 17:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:105730</guid><dc:creator>J. Daniel Smith</dc:creator><description>Leaving the general pros/cons of ATL aside, I think if the ultimate goal is to do this (mostly) in C#, it will be eaiser to get there from native C++/COM.&lt;br&gt;</description></item><item><title>re: SimpleScript Part One: DllMain is Boring</title><link>http://blogs.msdn.com/ericlippert/archive/2004/03/31/105329.aspx#105756</link><pubDate>Thu, 01 Apr 2004 17:32:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:105756</guid><dc:creator>Eric Lippert</dc:creator><description>&amp;quot;goto&amp;quot; gets a bad rap.  Yes, it can be misused, and when it is misused, it is horrible.  But just because something can be misused is no reason to eschew using it entirely!&lt;br&gt;&lt;br&gt;Basically what I'm doing here is exception handling on the cheap.  After all, if we were writing this code in exception handling style, the semantics wouldn't change:&lt;br&gt;&lt;br&gt;declare blah&lt;br&gt;try&lt;br&gt;{&lt;br&gt;foo &lt;br&gt;bar&lt;br&gt;baz&lt;br&gt;}&lt;br&gt;finally&lt;br&gt;{&lt;br&gt;clean up blah&lt;br&gt;}&lt;br&gt;&lt;br&gt;All that is doing is making the gotos invisible, but they're still there.  Remember, when it comes right down to it, an exception is  a &amp;quot;goto&amp;quot; that carries state and transfers control to a cleanup block.&lt;br&gt;&lt;br&gt;I like the benefits of exception handling, but the exception handling style doesn't mix well with COM programming.  Therefore I'm going to apply some discipline to my functions and get some of the benefits of exception handling without actually using exception handling.&lt;br&gt;</description></item><item><title>re: SimpleScript Part One: DllMain is Boring</title><link>http://blogs.msdn.com/ericlippert/archive/2004/03/31/105329.aspx#105840</link><pubDate>Thu, 01 Apr 2004 19:40:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:105840</guid><dc:creator>Dan Shappir</dc:creator><description>&amp;gt; I don't like the way it adds new syntax to&lt;br&gt;&amp;gt; C++, I don't like smart pointers, I don't&lt;br&gt;&amp;gt; like templates, I don't like debugging ATL&lt;br&gt;&amp;gt; memory leaks through a dozen indirection&lt;br&gt;&amp;gt; layers&lt;br&gt;&lt;br&gt;and&lt;br&gt;&lt;br&gt;&amp;gt; &amp;quot;goto&amp;quot; gets a bad rap&lt;br&gt;&lt;br&gt;Now I get it - you're a C programmer!</description></item><item><title>re: SimpleScript Part One: DllMain is Boring</title><link>http://blogs.msdn.com/ericlippert/archive/2004/03/31/105329.aspx#105853</link><pubDate>Thu, 01 Apr 2004 20:02:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:105853</guid><dc:creator>Eric Lippert</dc:creator><description>Yes, exactly.  When I write COM programs, I'm essentially a C programmer.  I use only a very small subset of the features of C++ when writing COM programs.&lt;br&gt;&lt;br&gt;When I move away from the directly-interfacing-with-COM parts of the engine and into the more &amp;quot;computer sciency&amp;quot; parts like the lexer/parser/generator I'll start using more and more C++ features -- inheritance, etc.&lt;br&gt;</description></item><item><title>re: Why not use ATL?</title><link>http://blogs.msdn.com/ericlippert/archive/2004/03/31/105329.aspx#106080</link><pubDate>Fri, 02 Apr 2004 02:27:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:106080</guid><dc:creator>John Stanhope</dc:creator><description>Actually I have been reading your Blog for a while and quite enjoying it:)  I was almost hoping for an insite into whether using ATL was a personal preference or something more company wide.  &lt;br&gt;&lt;br&gt;I have implemented COM objects using both ATL and straight C++ and while ATL doesn't buy you too much when implementing anything not supported by *Impl mixins it still reduce the initial burder.  And while I almost always use ATL I almost never us smart pointer unless the scope of usage is very small.</description></item><item><title>re: SimpleScript Part One: DllMain is Boring</title><link>http://blogs.msdn.com/ericlippert/archive/2004/03/31/105329.aspx#106123</link><pubDate>Fri, 02 Apr 2004 04:40:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:106123</guid><dc:creator>Eric Lippert</dc:creator><description>&amp;quot;Personal preference&amp;quot; vs &amp;quot;company wide&amp;quot; isn't really the right way to look at it.  It's very important to use the right tool for the job and not fall into the temptation of using tools just because they're the lastest cool thing.  People often ask me whether we use C# because Bill issued some proclamation that thou shalt use C# -- but it isn't like that at all.&lt;br&gt;&lt;br&gt;Some teams use a lot of ATL, some don't.  And in fact, we have a mixture of ATL, &amp;quot;straight&amp;quot; C++ and C# on my team, depending on what works best for a given task.  </description></item><item><title>re: SimpleScript Part One: DllMain is Boring</title><link>http://blogs.msdn.com/ericlippert/archive/2004/03/31/105329.aspx#106158</link><pubDate>Fri, 02 Apr 2004 05:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:106158</guid><dc:creator>senkwe</dc:creator><description>&amp;gt;&amp;gt;Yes, exactly. When I write COM programs, I'm essentially a C programmer. I use only a very small subset of the features of C++ when writing COM programs&amp;lt;&amp;lt;&lt;br&gt;&lt;br&gt;Soooo, I guess this begs the question. Are you a fan of OOP in general? It would be interesting to hear about which features of C++ you DO use. Any MI, templates? Or do you mold your C code around object oriented principles?&lt;br&gt;&lt;br&gt;Thanks!</description></item><item><title>re: SimpleScript Part One: DllMain is Boring</title><link>http://blogs.msdn.com/ericlippert/archive/2004/03/31/105329.aspx#106869</link><pubDate>Sat, 03 Apr 2004 00:17:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:106869</guid><dc:creator>Eric Lippert</dc:creator><description>That's a big question which deserves an entry on its own.  Let me just sum up by saying that OOP is a means, not an end.  I am a big fan of OOP when it achieves my goals -- the efficient construction of large-scale software -- and opposed to it when it impedes those goals.  &lt;br&gt;&lt;br&gt;As you know if you read my recent entries, I am very concerned about Object Happiness, the disease that strikes (typically novice) OOP programmers.  It makes people write &amp;quot;Hello World&amp;quot; programs using virtual abstract base classes.  &lt;br&gt;&lt;br&gt;To actually answer your question -- my team uses single inheritance a lot when modelling things that have clear IS A relationships.  We are beginning to use C# generics more and more, but mostly as consumers of, not producers of parametrized types.  &lt;br&gt;&lt;br&gt;I use multiple inheritance of concrete classes only very rarely and C++ templates even less often. Those things don't solve problems that I've got very well.&lt;br&gt;</description></item><item><title>re: SimpleScript Part One: DllMain is Boring</title><link>http://blogs.msdn.com/ericlippert/archive/2004/03/31/105329.aspx#106872</link><pubDate>Sat, 03 Apr 2004 00:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:106872</guid><dc:creator>Eric Lippert</dc:creator><description>Also, pet peeve:  to &amp;quot;beg the question&amp;quot; is to ANSWER a question in a circular manner, NOT to speak in such a way that encourages questions.&lt;br&gt;&lt;br&gt;For example, if you said &amp;quot;Why does Cindy Crawford look so good on those magazine covers?&amp;quot;  and I answered &amp;quot;Obviously, because she's so photogenic!&amp;quot; then I have begged the question.  I've answered the question in a way that because of its circularity, imparts no new information.</description></item><item><title>re: SimpleScript Part One: DllMain is Boring</title><link>http://blogs.msdn.com/ericlippert/archive/2004/03/31/105329.aspx#111020</link><pubDate>Sat, 10 Apr 2004 23:45:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:111020</guid><dc:creator>Louis Parks</dc:creator><description>Unfortunately, &amp;quot;begs the question&amp;quot; is so commonly used to mean &amp;quot;speak in such a way that encourages questions&amp;quot; that for most situations, that is what it means.  In like manner, &amp;quot;inflammable&amp;quot; should mean not flammable, but due to improper usage, its definition has changed.</description></item><item><title>re: SimpleScript Part One: DllMain is Boring</title><link>http://blogs.msdn.com/ericlippert/archive/2004/03/31/105329.aspx#111027</link><pubDate>Sat, 10 Apr 2004 23:59:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:111027</guid><dc:creator>Eric Lippert</dc:creator><description>That's proper usage.  You are making an incorrect deduction based on a misleading ambiguity in Latin.&lt;br&gt;&lt;br&gt;In Latin, the prefix &amp;quot;in&amp;quot; usually means &amp;quot;opposite&amp;quot;.  This comes to us in English as the prefix &amp;quot;un&amp;quot;.  Most English opposites use the English form &amp;quot;un&amp;quot;, obviously, but a few use the Latin form.  (&amp;quot;That's indecent!&amp;quot; for example.)&lt;br&gt;&lt;br&gt;But &amp;quot;inflammable&amp;quot; clearly comes from &amp;quot;inflame&amp;quot;, which does NOT mean the opposite of &amp;quot;flame&amp;quot;.  You think that if you get an inflammation of the ankle that it's going to feel cool, or hot?&lt;br&gt;&lt;br&gt;What's up with that?  Where does this come from?  &lt;br&gt;&lt;br&gt;It comes from the Latin PREPOSITION &amp;quot;in&amp;quot;, which is used to INTENSIFY a word or phrase.  So &amp;quot;inflammable&amp;quot; means &amp;quot;more intensely flammable&amp;quot;.&lt;br&gt;&lt;br&gt;Leaving your incorrect etymology aside, more generally your position is known as the &amp;quot;descriptivist&amp;quot; position -- that the meaning of a word or phrase depends on what people intend it to mean, and that therefore you really can't get it &amp;quot;wrong&amp;quot;.  The opposite position is &amp;quot;prescriptivist&amp;quot; -- the belief that words have meanings and that they can be used wrong.&lt;br&gt;&lt;br&gt;Though I certainly appreciate that English is an evolving language with a rich and flexible idiom (see the Wordzguy blog of my colleague Mike Pope for some great examples), I'm also of the belief that C-A-T refers to a small housepet and E-L-E-P-H-A-N-T does not EVEN IF I say that &amp;quot;my elephant is getting into fights with the other neighbourhood elephants.&amp;quot;&lt;br&gt;&lt;br&gt;There is value in preserving the distinction between subjects and objects, between flout and flaunt, between infer and imply, between disinterested and uninterested, enormity and enormousness...&lt;br&gt;</description></item><item><title>re: SimpleScript Part One: DllMain is Boring</title><link>http://blogs.msdn.com/ericlippert/archive/2004/03/31/105329.aspx#119276</link><pubDate>Sat, 24 Apr 2004 00:09:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:119276</guid><dc:creator>Patrick</dc:creator><description>Eric,&lt;br&gt;&lt;br&gt;Your digression into Latin prefixes and dichotomies or word meaning is exactly the reason I read technical blogs. I'm sure Microsoft is getting everything they pay for out of you.&lt;br&gt;&lt;br&gt;There are many interesting examples of word drift, of course. &amp;quot;Fortuitous&amp;quot;, for instance, very nearly has a new meaning due to an incredible amount of sustained misuse over a long period of time. Look for dictionaries to drop its proper usage to &amp;quot;archaic&amp;quot; class soon.&lt;br&gt;&lt;br&gt;As interesting as words that appear to mean their opposites are words that *became* their opposites. The OED's listing on &amp;quot;nice&amp;quot; is a good example. There are some thoughts on this here: &lt;a target="_new" href="http://www.barbwired.com/nadiaweb/nawl/archives/000202.html"&gt;http://www.barbwired.com/nadiaweb/nawl/archives/000202.html&lt;/a&gt;, which refers to Chaucer. Chaucer used many words a bit differently than we expect to define them today; a girl was any small child, and didn't indicate gender.&lt;br&gt;&lt;br&gt;The relationship between label and labelled is not perfectly stable. It is easier to communicate, or form ideas, if stability is high... obviously a common terminology is a major foundation for effective discussion. I usually find that early stage project proposals, technical notes, documentation, etc., benefits greatly from a glossary. The earlier in the conceptual stage, the more benefit.&lt;br&gt;&lt;br&gt;I guess the next step is to dissect the relationship between the phenomenal and the noumenal? :)&lt;br&gt;&lt;br&gt;Patrick</description></item><item><title>re: SimpleScript Part One: DllMain is Boring</title><link>http://blogs.msdn.com/ericlippert/archive/2004/03/31/105329.aspx#119365</link><pubDate>Sat, 24 Apr 2004 05:24:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:119365</guid><dc:creator>Peter Torr</dc:creator><description>&amp;gt; the belief that words have meanings and that they can be used wrong.&lt;br&gt;&lt;br&gt;...or &amp;quot;incorrectly&amp;quot; (is that a matter of grammar or a matter of style?)&lt;br&gt;&lt;br&gt;Getting back on topic (gosh!), I once (quite recently) tried to look up the Dll*Server exports on MSDN... they weren't actually documented anywhere! (Although it seems they are there now :-) )&lt;br&gt;&lt;br&gt;OK, so there really wasn't anything &amp;quot;on topic&amp;quot; in this post...</description></item><item><title>re: SimpleScript Part One: DllMain is Boring</title><link>http://blogs.msdn.com/ericlippert/archive/2004/03/31/105329.aspx#120303</link><pubDate>Mon, 26 Apr 2004 16:13:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:120303</guid><dc:creator>Eric Lippert</dc:creator><description>Peter, you've got to learn to take a cue from Apple and &amp;quot;think different&amp;quot; when it comes to adverbs.&lt;br&gt;&lt;br&gt;Patrick, the phenomenal and the noumenal have a purely nominal relationship.</description></item><item><title>re: SimpleScript Part One: DllMain is Boring</title><link>http://blogs.msdn.com/ericlippert/archive/2004/03/31/105329.aspx#121254</link><pubDate>Tue, 27 Apr 2004 18:32:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:121254</guid><dc:creator>Patrick</dc:creator><description>Eric,&lt;br&gt;&lt;br&gt;I respectfully disagree. I'd say it's a relationship that's perfectly natural.&lt;br&gt;&lt;br&gt;Patrick</description></item><item><title>Geek Notes 2004-04-02</title><link>http://blogs.msdn.com/ericlippert/archive/2004/03/31/105329.aspx#124493</link><pubDate>Sat, 01 May 2004 19:40:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:124493</guid><dc:creator>Geek Noise</dc:creator><description /></item><item><title>Do Not Call IsValidFooPtr, Indeed</title><link>http://blogs.msdn.com/ericlippert/archive/2004/03/31/105329.aspx#774118</link><pubDate>Wed, 27 Sep 2006 21:21:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:774118</guid><dc:creator>Fabulous Adventures In Coding</dc:creator><description>&lt;br&gt;&lt;br&gt;Here’s a story that I said &lt;br&gt;&lt;br&gt;a long time ago that I was&lt;br&gt;going to tell you all, and then promptly...</description></item></channel></rss>