From: Mayayana on 27 Aug 2010 09:17 | Got side tracked with interesting results. I did buy a used VBS book, | circa 1999. It appears VBS is really for web apps. It started out as a web scripting language to compete with Netscape. Many people assumed Netscape would then incorporate VBScript. It never did. Likewise with ActiveX. By 1998 people were asking for a GUI scripting tool to replace the outdated DOS command line. MS used VBS in that, creating the WSH. By adding "CreateObject" they extended VBS to handle COM libraries. There's a great deal that VBS can do, but very little it can do by itself. It's strength is that it can use nearly any COM library with a Dispatch interface. ("late binding") Today VBS is for use with WSH, in ASP, and in HTAs. (Scripted GUI programs that run in IE, using the DOM to provide functionality.) You can use it online, but only for IE. I use VBScript on my own website. In general I try to avoid any script because it's unsafe and I don't enable it in the browser myself. But IE is way behind in support for CSS, and I want to do things (like "flyout menus") that won't work in at least some versions of IE. So I use PHP to load one version of each webpage for IE and another, script-free version of the page for all other browsers. Since the IE page goes only to IE I can use VBS for the script. | | Still curious about VBS. My guess is that it is nowhere as powerful as | using VB, but isn't really used for of with html. | VBS is a script, subset version of VB. The language is very similar. At it's simplest, VB is designed so that beginners can essentially write script, using only variant data types and ActiveX Controls, with garbage collection. But that's just the training wheels. VB is normally used with strong data typing, uses the Win32 API, and one can dispense with the ActiveX .ocx file wrappers. In that usage VB is comparable to C++, producing native code executables. (But the methodology is different from C++, since VB is designed to be safer, with garbage collection, simplified string operations, and less direct access to memory addresses.) That all needs to be differentiated from VB.Net, which is often referred to as "VB" these days. VB5 and 6 are VB. They're very similar, with VB6 being a minor update. Starting with VB.Net (sometimes misleading called "VB7") Microsoft dropped support for VB while adding a VB-like language to the .Net system, which is essentially a Java clone running JIT-compiled code on top of a VM. Note that if you use VB, VB5/6 are supported from Win95 through Win7, but I don't think the runtime for VB5 is pre-installed on Vista/7. You'd need to install that on target machines. If you use VB6 it's essentially dependency free on 2000/ME/XP/Vista/7. (The runtimes can be installed on earlier Windows versions.)
From: Mayayana on 27 Aug 2010 09:18 | | I prefer the ideas of Edsger Dijkstra [1930-2002] about Basic. | Felt intuitivity leads to sloppy programming. | There is beauty in Javascript that fails in VBS. | | Example, the sloppy allowance in vbs of this faulty statement: | | if a = b then c = d end if | I don't see the problem with that. If it's sunny then we're going to the beach. I don't find that I get confused re-reading my code, thinking that the beach turned into the sun. I find that arrogance about one's chosen language tends to be in relation to the terseness of it. C++ people are stuck with annoying semi-colons, but that doesn't stop a lot of them from holding forth about their "superior" language. And many Perl users seem to think they're the Chosen People. But "We're number 1!" is simply childish, no matter what the topic. PS - Al, I'd suggest that you don't take up this issue with your wife. She may not appreciate that you're thinking about women who look like her -- even if they are her. :)
From: Evertjan. on 27 Aug 2010 10:17 Mayayana wrote on 27 aug 2010 in microsoft.public.scripting.vbscript: >| I prefer the ideas of Edsger Dijkstra [1930-2002] about Basic. >| Felt intuitivity leads to sloppy programming. >| There is beauty in Javascript that fails in VBS. >| >| Example, the sloppy allowance in vbs of this faulty statement: >| >| if a = b then c = d end if >| > > I don't see the problem with that. Then you are not a Basic native speaker. there are two forms of If-then: ============== if a then b ============== and the young William Gates invention: ============== if a then b end if ============== so the below is an error and should flagged down as an error: ============== if a then b end if ============== end it is flagged down in many Basics but not in in MS-VBS. > If it's sunny > then we're going to the beach. I don't find that I > get confused re-reading my code, thinking that the > beach turned into the sun. Why should you be. It can be sunny on the beach and minus 40, immaterial if in degrees Celcius or Farenheit. > I find that arrogance Wow, we are talking VBS here, arrogance is off topic. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
From: Al Dunbar on 27 Aug 2010 21:51 "Evertjan." <exjxw.hannivoort(a)interxnl.net> wrote in message news:Xns9DE161EA0B94Feejj99(a)194.109.133.242... > Al Dunbar wrote on 27 aug 2010 in microsoft.public.scripting.vbscript: > >> I find this a bit more intuitive: > >> <script type='text/vbscript'> >> result = not ( true = false ) >> </script> > > I prefer the ideas of Edsger Dijkstra [1930-2002] about Basic. > Felt intuitivity leads to sloppy programming. Perhaps. When did he actually say that? And did he ever have a chance to comment on 21st century platforms? In reality, I agree with him. I have seen a lot of sloppy VBS code (some my own). But a corollary might be that a language that is so rigid in its syntax rules might hamper ingenuity in some. Yes, there are aspects of vbscript syntax that could result in sloppy coding. But for this very reason, many serious scripters develop discipline strategies to ward that off. > There is beauty in Javascript that fails in VBS. Beauty, they say, is in the eye of the beholder, though. I don't find Javascript code particularly esthetic, likely because I find it more difficult to follow than vbscript. Admitedly, that is because I use vbscript and not Javascript. For relative comparisons, I will have to defer to those equally conversant in, and happy with, both languages. Know anyone in that category? > Example, the sloppy allowance in vbs of this faulty statement: > > if a = b then c = d end if Well, what vbscript allows is a moot point, as those (apparent) weaknesses will never be addressed (along with the known bugs). A good thing too, as that would probably break a lot of code. /Al
From: Al Dunbar on 27 Aug 2010 21:56
"Mayayana" <mayayana(a)invalid.nospam> wrote in message news:i58dmo$r2t$1(a)news.eternal-september.org... <snip> > I find that arrogance > about one's chosen language tends to be in relation > to the terseness of it. Interesting observation. I prefer this one: language arrogance is not healthy regardless of the chosen language. These are tools, guys, let's not get our shorts tied in knots arguing the number of angels on the head of a pin! > C++ people are stuck with > annoying semi-colons, but that doesn't stop a lot > of them from holding forth about their "superior" > language. True. But those who actually like the semi-colons do not agree that they are stuck with them. They are probably happy not to have too many colons, otherwise they will be forced to cleanse. > And many Perl users seem to think they're > the Chosen People. But "We're number 1!" is simply > childish, no matter what the topic. LOL. Do you know *any* language that has no zealots?? > PS - Al, I'd suggest that you don't take up this > issue with your wife. She may not appreciate that > you're thinking about women who look like her -- > even if they are her. :) Hmm, for a computer geek, you seem to have some fairly sophisticated views about relations between the sexes. I'll keep your advice in mind. /Al |