POV-Ray : Newsgroups : povray.off-topic : Povray versus Objective-C: objects : Re: Povray versus Objective-C: objects Server Time
28 Jul 2024 22:16:32 EDT (-0400)
  Re: Povray versus Objective-C: objects  
From: Le Forgeron
Date: 20 Oct 2012 12:16:09
Message: <5082ce49$1@news.povray.org>
Le 20/10/2012 16:53, gregjohn nous fit lire :
> #declare headRotation= 90*y*clock;
> #include "myIncWhichDeclaresObjectNamedBody.inc"
> object {body transform{someTransform} etc.}
> 
> 
> Suppose you've declared an object in povray as above.
> Stepping back to a discussion of the philosophy of programming, exactly how is
> this object similar and how is it different from an Objective-C object?
> (Not quite interested in Java, Smalltalk objects for now.)
> 

differences:
* Inheritance
* Messages (as specified by objective C)

Philosophically, objects in Povray are to objects in Objective C what
bicycle are to air-plane in transportation (or vice-versa).

http://en.wikipedia.org/wiki/Objective-C



object {}: this actually creates an instance/clone of body and applies
the transformation on it.

There is no inheritance in Povray SDL. (or did I missed that ?)
There is no messages/function to be called on object (once created, an
object often become a closed container that you cannot read back or
alter (excepted by cloning, or some specific functions which expect to
be provided an object))

Notice that Objective C took its convention from smalltalk (to extend
the basic C) so avoiding any smalltalk is going to be difficult.

A chair in povray is an object of the scene.
A chair-object in objective C is first an abstraction of a interface and
might as well be some instance of it. (there is class methods and
instance methods, not the same things)


An object in povray is:
 * a textured 2D-shape immersed in 3D, which might also split the 3D
space between two parts(the inside and the outside), with different
properties. The object might be part of the scene, or it might also not
appear in it.

An object in programming language is:
 * an encapsulation of some parts of a modelling (appropriate for the
problem to be solved), whose purpose is to reduce the complexity of the
whole issue by splitting it in multiple smaller problems, hopefully
disconnect-able, and with a reduced set of interactions with other objects.


Post a reply to this message

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