🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #3293

Cheap shot

#3293
From: cs450a03
Date: Fri, 29 Mar 1991 23:50
40 lines
2026 bytes
First off, here's the cheap shot:

printf("%s%d%s%c", "one", "two", 3);

The moral of the story is that there is a difference between an
ability and a feature, though ability is a prerequisite for feature.

Oh yeah, by the way, this is:
yet-another-article-on-static-and-dynamic-typing

----------------------------------------------------------------------

I caught myself admitting that C can do dynamic typing.  But then I
started thinking about various C programs I'd dealt with.

The irony is that people used to static typing have been saying "well,
if you have run-time type checking, then when you have a type error in
your program, the machine will go off into never-never land until it
eventually hits a type error" when this is exactly the case run-time
type checking is supposed to catch.

----------------------------------------------------------------------

I have also seen statements that seem to imply that run-time type
checking precludes type-casts.  This is an implementation issue, not a
fundamental issue.  Note that you could have either a C-like cast, or
one that casts from a specific type (say integer) to a specific type
(say character)--in either case, you'd get a simple function that
stuffs an appropriate value into the type field of its result.

----------------------------------------------------------------------

Finally (while I'm picking on C :-) consider 
extern array[]; int foo[sizeof array];

----------------------------------------------------------------------

Your mileage may vary.

Raul Rockwell
Technical Details
Message-ID: <29MAR91.23503998@uc780.umd.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!caen!uflorida!gatech!purdue!haven!ni.umd.edu!uc780.umd.edu!cs450a03

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!caen!uflorida!gatech!purdue!haven!ni.umd.edu!uc780.umd.edu!cs450a03
From: cs450a03@uc780.umd.edu
Newsgroups: comp.lang.misc
Subject: Cheap shot
Message-ID: <29MAR91.23503998@uc780.umd.edu>
Date: 29 Mar 91 23:50:39 GMT
Sender: usenet@ni.umd.edu (USENET News System)
Organization: The University of Maryland University College
Lines: 40