|
|
Invisible <voi### [at] devnull> wrote:
> Well, I guess there are probably people who look at something like
> x = (-b +- Sqrt(b^2 - 4ac)/2a
> and go "OH MY GOD! That looks SO complicated!" But actually, if you know
> a little algebra, you discover that this contraption is actually quite
> straight forward.
I wouldn't call this straightforward:
fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
Short? Yes. Clever? Yes. Easy for a non-haskell-programmer
non-mathematically-oriented person to understand? No.
(The curious thing about that is that it's easy to convince a layman
that it works, but the more (procedural) programming you know, the harder
it will be to understand *why* it works (and isn't, for example, an infinite
recursion that never terminates, as there doesn't seem to be any kind of
termination condition). Also understanding why it procudes the correct
result may be difficult.)
> Possibly a dump question, but... can you actually call a C interface
> from C++?
That's the whole idea.
> At any rate, presumably you can completely forget Warp's
> "don't use pointers" rule if you want to talk to OpenGL - or any other
> API designed for C. ;-)
I don't recall OpenGL requiring that many pointers either. Just tons
of straight function calls.
--
- Warp
Post a reply to this message
|
|