comp.lang.ada
 help / color / mirror / Atom feed
* Variable Args, Ada
@ 1994-10-15 21:57 Paul Santa Maria
  1994-10-18 16:44 ` Robert Dewar
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Santa Maria @ 1994-10-15 21:57 UTC (permalink / raw)


I need to write an Ada wrapper (pragma interface) around a 'C' 
function that takes variable arguments (similar to "printf").  

Can this be done?  How?  Please reply via e-mail:

   Paul Santa Maria
   paul@atc.com
   (714) 583-9119x213 VOICE
   (714) 583-9213 FAX

Thank you in advance .. PSM



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Variable Args, Ada
  1994-10-15 21:57 Variable Args, Ada Paul Santa Maria
@ 1994-10-18 16:44 ` Robert Dewar
  0 siblings, 0 replies; 2+ messages in thread
From: Robert Dewar @ 1994-10-18 16:44 UTC (permalink / raw)


"Why should any modern high-level language allow a programmer to code
something that will be "unsafe" or "dangerous".  Weren't the terse
grammar and compiler designed (in part) to prevent that?"

Any generally usable programming language that intends to be useful for
systems programming (e.g. writing device drivers, or other low level
stuff) needs some access to "unsafe" stuff.

Similarly there are times when even at a relatively high level of
abstraction it is reasonable to break the type security (consider
for example the problem of efficient hashing of floating-point
values).

The point is that the language should be designed so that such unsafe
usage is well advertised and can be easily controlled. That is why in
Ada you need to write a lot of "junk", including a notice at the top of
your file ("with unchecked conversion") to do what in some languages
could be done in a very straightforward way, TOO straightforward and
too easily abused.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1994-10-18 16:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1994-10-15 21:57 Variable Args, Ada Paul Santa Maria
1994-10-18 16:44 ` Robert Dewar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox