POV-Ray : Newsgroups : povray.off-topic : Programming language development : Re: Programming language development Server Time
5 Sep 2024 19:22:28 EDT (-0400)
  Re: Programming language development  
From: clipka
Date: 3 Oct 2009 14:41:04
Message: <4ac79ac0$1@news.povray.org>
Orchid XP v8 schrieb:

> Hell, in Haskell land, people 
> regularly attempt to write code which is *provably secure*. (But then, 
> you have to define "secure" first... It's easy to prevent buffer 
> overruns, but not so simple to prevent glitches where access denied 
> messages inadvertantly reveal information indirectly.)

There's indeed no such thing as "provably secure".

People thought smartcards were provably secure, because they would keep 
their data to themselves, and communicate to the outside world only via 
a single, clearly defined 3-wire interface with a clearly defined 
protocol. So how could anyone possibly get at the data?

Then people realized that there are two other wires interfacing the card 
to the outside world: The power supply. And they found that as the card 
does its cryptographic computations, it mumbles to itself in a distinct 
pattern.

The problem is that proof is always based on axioms - and each axiom can 
turn out to be wrong (otherwise it wouldn't be an axiom but a theorem, 
and therefore itself based on other axioms). In this case, the axiom was 
"the smartcard reveals information only via a single 3-wire interface".


>> That seems to go into a similar direction as contract-oriented design.
> 
> Yeah, that's a nice idea. Doesn't seem very popular though...

It's my favorite approach, actually. I know of no better or easier way 
to design the interface of any module, class, component or what-have-you.


>> Try implementing and using generic container classes in a non-OO 
>> language.
>>
>> Then try to refactor your application to use a deque container instead 
>> of a stack for a certain job. Or a tree-backed map instead of a 
>> hash-table-backed one someplace else.
>>
>> You won't have much success without implementing verbosely what OO 
>> languages do for you behind the scenes.
> 
> Tried using Haskell recently? Haskell is not OO.

Okay, let me rephrase that: Try that in a non-OO /mainstream/ 
(imperative) language.

The functional approach has many features that give it power similar to 
(if not greater than) the object-oriented approach, so I leave it out of 
the discussion of OO achievements.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.