From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 114809,b87849933931bc93 X-Google-Attributes: gid114809,public X-Google-Thread: fac41,b87849933931bc93 X-Google-Attributes: gidfac41,public X-Google-Thread: 109fba,b87849933931bc93 X-Google-Attributes: gid109fba,public X-Google-Thread: 1108a1,b87849933931bc93 X-Google-Attributes: gid1108a1,public X-Google-Thread: 103376,b87849933931bc93 X-Google-Attributes: gid103376,public From: Graham Hughes Subject: Re: OO, C++, and something much better! Date: 1997/01/22 Message-ID: <5c6468$2rv$1@A-abe.resnet.ucsb.edu>#1/1 X-Deja-AN: 211588064 sender: graham@resnet.ucsb.edu references: <32DF458F.4D5C@concentric.net> <32DF94DC.6FF8@watson.ibm.com> <32DFD972.37E4@concentric.net> <5bphq4$5js@mulga.cs.mu.OZ.AU> <32E05FAF.47BA@concentric.net> <5buodl$bci@boursy.news.erols.com> <32E2FEC7.2F7B@concentric.net> <5bvncj$gqg$1@A-abe.resnet.ucsb.edu> <32E47B4B.56D9@concentric.net> <5c4fr0$27j@mulga.cs.mu.OZ.AU> <32E67751.4AFC@parcplace.com> organization: UCSB newsgroups: comp.lang.c++,comp.lang.smalltalk,comp.lang.eiffel,comp.lang.ada,comp.object Date: 1997-01-22T00:00:00+00:00 List-Id: -----BEGIN PGP SIGNED MESSAGE----- More preaching to the converted, it seems... Eric Clayberg writes: >If anything, I think that reflects poorly on the syntax of whatever >language you were using. The more "rules" a language has, the more >involved its syntax, and the more draconian its type system, then the >more type errors are likely to be created by the developer and then >caught by the compiler. In a language like Smalltalk which has an >absurdly simple, consistent syntax, and which has a very open-mined >concept of "type", very few type errors are ever created to begin with >and thus very few actually exist to be found. The *few* real type errors >that are created tend to be caught almost immediately by Smalltalk's >superb debugging facilities. Bullshit. If I pass a rectangle to something expecting an integer, no amount of ``absurdly simple, consistent syntax'' or ``open-minded concepts of "type"'' will prevent the ensuing carnage. Having a type error propogate to the user is the height of immaturity. What makes you think that the ``superb debugging facilities'' are going to be at the installation site? And before you say that no one will ever pass a rectangle to something expecting an integer, realize that this could easily be the result of a typo on your part, or your caller's part, and so on up the chain. This can be forstalled slightly by an incremental building process, but incremental building processes don't require Smalltalk or dynamic typing or interpreters. >Having been involved with commercial Smalltalk development for quite a >few years, I tend to agree with Alan that the percentage of actual type >related errors in Smalltalk programs is less that 2% - far less in my >experience. You mean the percentage of actual type related errors that you have actually _caught_, no? There is a substantial difference. In my own experience, most type errors are the result of typos or of mismatches between what I _think_ is the right way to call a function and what the right way actually is. C's fgets() is a reasonably good example of this. This is a stylistic issue, and switching to named arguments or Smalltalkish message parameters doesn't solve it, only forstall it. Much better that something mechanical check this than I; I have been known to make mistakes, or overlook things. Of course, the machine is perfectly incapable of actually writing the software on its own, which is where I come in. Ada compilers, which are otherwise not my favorite things in the world to deal with, are good examples of this philosophy. Ada believes very strongly in catching every error that is possible to catch at compile time. The result: while it's not impossible to get a buggy program pushed through an Ada compiler, you stand a very good chance of getting yelled at for your bonehead typos. >I am amazed at the level of hubris evidence in this discussion. Folks >are jumping in and making assumptions about how Smalltalk works based >upon how their favorite statically typed language works. Smalltalk has I _have_ used Smalltalk. It has some interesting concepts, and the message protocol and metaclasses are elegant in their own ways. But I'm not about to rely on it to catch my typos, which are the source of 90% of my bugs these days, any more than I'm going to rely on my C++ compiler to catch logic errors for me. Your perception of the tradeoffs are obviously different, and that's fine; I prefer differing points of view to pushing down the party line. I don't believe, however, that dynamic typing is the saviour from above, or that it's going to save the world. It's had _lots_ of time. Incidentally, if you really care about spreading Smalltalk you might want to attempt to get the FSF to fix their Smalltalk implementation. I can't fiddle around with Smalltalk anymore because that's the only one I can get for Linux, and it doesn't work. - -- Graham Hughes (graham.hughes@resnet.ucsb.edu) http://A-abe.resnet.ucsb.edu/~graham/ -- MIME & PGP mail OK. "Never attribute to malice that which can be adequately explained by stupidity." -- Hanlon's Razor -----BEGIN PGP SIGNATURE----- Version: 2.6.2 iQCVAwUBMuaT/SqNPSINiVE5AQFnVwP+IZZZWjclFEOM4bh5zJ50q34A5s7EWsaX PbiSmVh4k0Wzz7sFIQqNfjzYKso8a09eVj1xPOj2Kl0lqJ1uVzqm6nHJtv4pE92U XGEqexLs57dLdHBSZEDkXvqDw76WXqV6uSSy22hg+UDjPAcMvnERgHKghFc0ss5M LSRrMRBx+2Q= =vyYE -----END PGP SIGNATURE-----