 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Chambers wrote:
> Point taken. I got in the bad habit of using my headers as my
> documentation, and coding my implementations to match them, rather than
> keeping the documentation separate :)
That's a perfectly reasonable way to do it in a language that requires
headers to start with. A language with javadoc-like features? Nah.
The cool thing about Eiffel is you can not only produce a document that's
the equivalent of a .H or javadoc (doxygen, etc) file, but also a "flat"
version that includes all the documentation from the parent classes that you
didn't override. So if you want the docs for "hashtable implemented using
arrays of streams" documentation, you don't need to grope through three or
more superclasses just to understand what that one class does.
> Of course, being Visual Studio, the Class explorer offers similar
> functionality, but it's not in the same form I'm used to from looking at
> header files. Ah, well, I'll adjust eventually.
Yep. And Smalltalk is even more different, since you can open browsers on
things like "all classes that implement a method called X". Smalltalk being
one of those "duck-typing" languages.
Speaking of which, what is "duck typing" that isn't just "dynamic typing"?
WTF does that even mean?
> Yes, it is rare. But good, so keep it up :)
I remember once way back, having written docs for the library, I was sitting
there coding it up. (The project was a rewrite from BASIC to C, so I had a
real good idea what the library needed to do.) I had a stack of
documentation, and I was implementing each function. The "best" programmer
in the company comes up and asks what I'm doing, and I tell him. He points
to the inch-thick print-out, asks what it is, and I tell him it's the docs.
He says, sounding baffled, "How can you write the docs before the program?"
I ask him "How can you know when you're done programming without writing the
docs first?"
Ah, fun times. The first time I ever completely stopped taking a job seriously.
--
Darren New, San Diego CA, USA (PST)
"We'd like you to back-port all the changes in 2.0
back to version 1.0."
"We've done that already. We call it 2.0."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
clipka wrote:
> Chambers <Ben### [at] gmail com_no_underscores> wrote:
>>> the buck does *not* stop here.
>> Shouldn't that be "the Buck"? ;)
>
> ??
>
>
As in, David K Buck :)
--
Chambers
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
David H. Burns wrote:
> What I have seen of OOP programming is something else.
Just out of curiosity (but you keep saying things like this, so I have
to ask), where have you seen OOP programming?
--
Chambers
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Neeum Zawan wrote:
> OK. Now I'm _really_ confused!
>
> Was your initial concern that POV-Ray - the *software* - will be
> coded using OOP?
>
> Or was it that the language that *users* of POV-Ray will have to use
> to describe their scenes will be OO?
That was my original concern but this thread seems to a mutated as
threads do.
Any opposition to OOP seems to arouse a lot of feeling.
>
> Now if your concern is the latter (that you as a *user* will have to
> describe your scene using OOP), then your concerns are not entirely
> unfounded, but they won't be relevant for a while. 3.7 will allow you to
> code as you have mostly done.
>
Yes, I'm now told that a new scripting language is decades away so I suppose
my major concern is about 20 years or so too early. What language or
with what
"philosophy" Pov-Ray is coded in is of only minor concern, if the end
product remains
usable to me.
It's all been very interesting, though.
David
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Neeum Zawan wrote:
> On 07/23/09 11:15, David H. Burns wrote:
>>> I'm sure you think in OOP all the time with POV-Ray. You create a
>>> sphere. It's an object with certain properties (texture, location,
>>> etc). Now let's say you want to rotate the sphere, does it hurt so
>>> much to do something like:
>>>
>>> mysphere.rotate(45)
>>>
>>
>> No! I think in terms of objects, not of OOP. The concept of an "object"
>> as used
>> in Pov-Ray in a valuable tool for thinking and programming -and used
>> well there.
>> What I have seen of OOP programming is something else. :)
>>
>> David
>>
>
> OK. I have no idea what you're saying.
>
> What is the "No" referring to? Are you saying "no, it doesn't hurt"?
> Are you saying "No, I hate that way of doing it"? Are you sweeping your
> hand across my whole message and saying "No! I can't stand it!"?
>
I'm sorry to seem unclear, but to me it seems that the "No" and the rest
of my
statement clearly refer to the assertion that I think in OOP all the
time when using
Pov-Ray. It seems to me that I don't, though perhaps others may know my
mind better that I do. In fact. since OOP means Object Oriented
Programming, it seems
absurd to say that I think in it (or in any other kind of programming).
On the other hand,
I am repeated told that I don't know what OOP means; maybe it *doesn't* mean
"Object Oriented Programming"(acronyms are always obstacles to
communication),
but some philosophy or mystery into which I have not been initiated. In
any case, it seems
an overstatement at least for someone else to say I thing in it. :)
David
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Chambers wrote:
> David H. Burns wrote:
>> What I have seen of OOP programming is something else.
>
> Just out of curiosity (but you keep saying things like this, so I have
> to ask), where have you seen OOP programming?
>
Your point is well taken. I have *never* seen OOP *programming*. I
looked at some
short OOP programs or excerpts in C++, python, and Visual Basic --
though I believe that the
earlier VB code that I have seen aren't really OO, but simply have some
of the trappings.
The "OOP" code I've seen in VB could have been written without the
OOP-like veneer.
To actually see OOP "programming", I suppose I would have to see some
one actually
coding in OOP.
I don't want to have to write something like those programs, I have
seen to produce a Pov-Ray
script!
But, apparently, that is a worry for only the remote future.
David
David
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
David H. Burns wrote:
> Warp wrote:
>
>> The whole idea of object-oriented programming is to make it *easier* to
>> write programs, especially compared to straightforward
>> imperative/structured
>> programming (as the SDL is currently).
>>
>
> That I cannot believe!!
Now you guys know how *I* feel when I try to tell people that functional
programming is a good idea. ;-) Nobody ever seems to believe me...
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> Even if POV4 does change to an OOP model that you don't like, a) that is
>> not going to be released for decades, and b) you are free to still use
>> the latest stable 3.x release. I wouldn't worry about it.
>>
> If that be the case, shall we postpone this discussion for
> twenty years or so? :-)
Not if you want to influence the POV4 design, the discussions for that have
already started, although I suspect it won't be until after POV3.7 is out of
beta before any real work gets started on it.
> Did that produce a wink.
I got a smile :-)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
scott wrote:
>> If that be the case, shall we postpone this discussion for
>> twenty years or so? :-)
>
> Not if you want to influence the POV4 design, the discussions for that
> have already started, although I suspect it won't be until after POV3.7
> is out of beta before any real work gets started on it.
Are they going on on some other Pov-Ray newsgroup? The Pov4 group I
could get to
seemed to be involved with other things. I may have said too much anyway.
>
>> Did that produce a wink.
>
> I got a smile :-)
Oh well...
David
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Invisible wrote:
> David H. Burns wrote:
>> Warp wrote:
>>
>>> The whole idea of object-oriented programming is to make it
>>> *easier* to
>>> write programs, especially compared to straightforward
>>> imperative/structured
>>> programming (as the SDL is currently).
>>>
>>
>> That I cannot believe!!
>
> Now you guys know how *I* feel when I try to tell people that functional
> programming is a good idea. ;-) Nobody ever seems to believe me...
You encourage me. But we seem to be out of fad. ;-) :) (An attachment
to your email reader which converted all ASCII characters into icons
would be interesting -- or stand alone program. It's probably been done.)
David
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> Are they going on on some other Pov-Ray newsgroup? The Pov4 group I could
> get to
> seemed to be involved with other things. I may have said too much anyway.
Check the povray.pov4.discussion.general group, particularly the threads
"Next Generation SDL Brainstorming" and "Next Generation SDL: What's wrong
with Lua, JavaScript, ...".
If you have something to contribute (eg "Hey I think my suggestion is better
than any OOP idea I've seen, and here's why...") then you should post it in
that group. This group goes off-topic very quickly no matter what you say
:-)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 07/24/09 02:53, David H. Burns wrote:
> Yes, I'm now told that a new scripting language is decades away so I
> suppose
> my major concern is about 20 years or so too early. What language or
> with what
> "philosophy" Pov-Ray is coded in is of only minor concern, if the end
> product remains
> usable to me.
The decades was an exaggeration. However, it is a while away. Work has
not begun on 4.0, and it intends to be quite different from today's
POV-Ray - and not just in terms of the scripting language.
--
AD&D Famous last words: Me first. Me first!
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
scott wrote:
> Check the povray.pov4.discussion.general group, particularly the threads
> "Next Generation SDL Brainstorming" and "Next Generation SDL: What's
> wrong with Lua, JavaScript, ...".
Thanks, Scott,
I see only 4 threads and neither of these. Thunderbird is giving me
problem?
I initially told it to download only 100 messages and can't get it to
down load anymore.
After unsubscribing and re subscribing a couple of times, it downloads
only 107. Maybe
power on power off will help.
David
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 07/24/09 03:43, Invisible wrote:
> Now you guys know how *I* feel when I try to tell people that functional
> programming is a good idea. ;-) Nobody ever seems to believe me...
I, for one, propose that the SDL in POV-Ray 5.0 should be functional.
--
AD&D Famous last words: Me first. Me first!
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 07/24/09 07:38, David H. Burns wrote:
>> Now you guys know how *I* feel when I try to tell people that
>> functional programming is a good idea. ;-) Nobody ever seems to
>> believe me...
>
> You encourage me. But we seem to be out of fad. ;-) :) (An attachment
Hardly, What you like is procedural. Functional programming is a whole
other beast altogether, where you normally don't do explicit loops but
use constructs like map, filter, etc. Lots of lambdas thrown in as well.
--
AD&D Famous last words: Me first. Me first!
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> The decades was an exaggeration.
I made a formula to figure out when v4 will be complete :-)
2009 + B + K*(A + B)
Where:
A = years already spent on v3.7 devlopment
B = years still to go until v3.7 is complete
K = multiplier for amount of work needed for v4 compared to v3.7
A is 5 I think? Choose some values for B and K and see what you get!
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> Now you guys know how *I* feel when I try to tell people that functional
>> programming is a good idea. ;-) Nobody ever seems to believe me...
>
> I, for one, propose that the SDL in POV-Ray 5.0 should be functional.
I'm not sure whether we should go for 100% functional, or do 95%
functional. You know, like the way SQL is 95% relational (but still 5%
procedural). I'm unsure at this time...
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> Check the povray.pov4.discussion.general group, particularly the threads
>> "Next Generation SDL Brainstorming" and "Next Generation SDL: What's
>> wrong with Lua, JavaScript, ...".
>
> Thanks, Scott,
> I see only 4 threads and neither of these. Thunderbird is giving me
> problem?
I don't use Thunderbird, but maybe someone else might be able to help you.
In Windows Live Mail you can choose "Tools -> Get Next <X> Headers" where X
is the value you set for how many to download at a time - maybe there is
something similar?
If not then you can always use the web view here:
http://news.povray.org/povray.pov4.discussion.general/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>>> Now you guys know how *I* feel when I try to tell people that functional
>>> programming is a good idea. ;-) Nobody ever seems to believe me...
>>
>> I, for one, propose that the SDL in POV-Ray 5.0 should be functional.
>
> I'm not sure whether we should go for 100% functional, or do 95%
> functional. You know, like the way SQL is 95% relational (but still 5%
> procedural). I'm unsure at this time...
I wonder if it would it be possible for POV to expose its core functions in
a standard way (eg in a dll for windows), and then you can access them from
any programming language you like. The SDL parser just needs to be a
special case that parses the file and calls the same POV core functions that
you can from your own code.
It would make things like doing complex simulations much easier, because you
could use eg C++ to get good speed, and have POV render the result quickly
each frame. Also if you wanted to use Haskell, or anything else, you could.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
scott wrote:
> I wonder if it would it be possible for POV to expose its core functions
> in a standard way (eg in a dll for windows), and then you can access
> them from any programming language you like. The SDL parser just needs
> to be a special case that parses the file and calls the same POV core
> functions that you can from your own code.
>
> It would make things like doing complex simulations much easier, because
> you could use eg C++ to get good speed, and have POV render the result
> quickly each frame. Also if you wanted to use Haskell, or anything
> else, you could.
That's an interesting idea. However, I have a vague recollection that
this would be incompatible with the terms of the POV-Ray license.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp <war### [at] tag povray org> wrote:
> > *Now* you're talking about something OOP- and programming-related:
> > Modularization. But what on earth does your previous post's talk of "concepts",
> > pens, cars, dogs and cats have to do with this?
>
> In object-oriented programming a class is basically a user-defined type,
> and a user-defined type is a concept. For example, "a string" is a concept,
> and a string class is the implementation of that concept.
Yeah yeah yeah... sure... I'm repeating myself here: *I* know how to map your
words to OOP, so you needn't tell me. It still doesn't convince me that
OOP-newbies have any idea what this cats & dogs crap is all about, and
introducing OOP in a much different way would make it much easier to grasp.
Let alone that OOP is not just "OOP". It is a combination of multiple concepts,
many of which don't require each other; the typical blurp tries to introduce
the whole "concept" of OOP all at once, instead of introducing the concepts one
by one.
> [lotsa stuff skipped]
> Modular programming does know the concept of instantiating modules. For
> example the modula programming language (which is not an OOP language) has
> modules with public and private interfaces, and which can be instantiated
> and referenced. (What makes it non-OOP is that it doesn't support inheritance
> nor obviously dynamic binding.)
.... and that's a very typical example of how modularity is commonly percieved,
huh?
Yes, modules occasionally *are* instantiated and referenced; but in typical
modular projects they're *not*, and instead just resemble code libraries.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New <dne### [at] san rr com> wrote:
> I remember once way back, having written docs for the library, I was sitting
> there coding it up. (The project was a rewrite from BASIC to C, so I had a
> real good idea what the library needed to do.) I had a stack of
> documentation, and I was implementing each function. The "best" programmer
> in the company comes up and asks what I'm doing, and I tell him. He points
> to the inch-thick print-out, asks what it is, and I tell him it's the docs.
> He says, sounding baffled, "How can you write the docs before the program?"
> I ask him "How can you know when you're done programming without writing the
> docs first?"
Now, ever wondered what the subtleties between SW development, programming and
coding may be?
What you did was SW development: Designing a program, then coding it.
What the other guy did was programming: Just make sure to produce a program, no
matter how...
:)
(BTW, did you know that your working style costs jobs? 'Cause as long as people
program software instead of developing it, you can't just outsource the coding
part to India... :P)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Chambers <Ben### [at] gmail com_no_underscores> wrote:
> >> Shouldn't that be "the Buck"? ;)
> >
> > ??
>
> As in, David K Buck :)
Ah - now here comes light ;)
But no: Leader of the dev team is currently Chris Cason :P
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"David H. Burns" <dhb### [at] cherokeetel net> wrote:
> I'm sorry to seem unclear, but to me it seems that the "No" and the rest
> of my
> statement clearly refer to the assertion that I think in OOP all the
> time when using
> Pov-Ray. It seems to me that I don't, though perhaps others may know my
> mind better that I do. In fact. since OOP means Object Oriented
> Programming, it seems
> absurd to say that I think in it (or in any other kind of programming).
> On the other hand,
> I am repeated told that I don't know what OOP means; maybe it *doesn't* mean
> "Object Oriented Programming"(acronyms are always obstacles to
> communication),
> but some philosophy or mystery into which I have not been initiated. In
> any case, it seems
> an overstatement at least for someone else to say I thing in it. :)
I'd guess you *do* some "OOP (= Object Oriented Programming) thinking" when
working with POV-Ray; it's just that you don't notice, because you admittedly
don't know what Object Oriented Programming actually is - you only know how
typical end results from such thought processes look like, when formulated in a
general-purpose language retrofitted to better support such formulations
("better" as in "better than nothing") - a language which, by the way, would
surely happen to be unsuited for a POV-Ray SDL.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 07/24/09 08:49, Invisible wrote:
>> It would make things like doing complex simulations much easier,
>> because you could use eg C++ to get good speed, and have POV render
>> the result quickly each frame. Also if you wanted to use Haskell, or
>> anything else, you could.
>
> That's an interesting idea. However, I have a vague recollection that
> this would be incompatible with the terms of the POV-Ray license.
The POV-Ray license will either disappear in 4.0, or will be made
compatible with one of those alleged "free" licenses.
--
AD&D Famous last words: Me first. Me first!
/\ /\ /\ /
/ \/ \ u e e n / \/ a w a z
>>>>>>mue### [at] nawaz org<<<<<<
anl
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"David H. Burns" <dhb### [at] cherokeetel net> wrote:
> I don't want to have to write something like those programs, I have
> seen to produce a Pov-Ray
> script!
Um... wait a second here: You've looked at code written to create POV-Ray code?
Now that's metaprogramming, which tends to look sick in *any* language that's
not designed for it, whether it be OOP or not.
> But, apparently, that is a worry for only the remote future.
Hmm... I don't really think so. Not if you talk about decares here. 3.7 did
indeed take a while to come out (still not released), but after all it was a
major rewrite of virtually the whole code, with some serious design changes to
get it to support SMP. Compared to that, I guess development of POV-Ray 4 will
be a piece of cake - the main objectives (um... no pun intended here, really)
being that major overhaul of the SDL (but that will just mean a rewrite of the
parser, leaving the remaining code untouched), and a change in licensing to go
for GPL (not much left to do there; AFAIK virtually all previous contributors
have given their OK by now, and the remaining pieces of code have been
completely re-written).
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
clipka wrote:
> I'd guess you *do* some "OOP (= Object Oriented Programming) thinking" when
> working with POV-Ray; it's just that you don't notice, because you admittedly
> don't know what Object Oriented Programming actually is -
We may all be engaging in muddy thinking and language here. I do kind of
think
in terms of "objects" when using Pov-Ray, but I wouldn't call that "OOP
(= Object
Oriented Programming) thinking", even if that phrase means
anything--which I doubt.
It might be more accurate to say that I am writing code which conforms
to the syntax dictated by
the SDL -- regardless of what kind of thinking leads to it. As I have
said several times before:
I think the concept of "object" is a real advance in programming but
"OOP" seems
a lot more than simpling making use of "objects" which "contain" both
data members
and functions ("methods")
>you only know how
> typical end results from such thought processes look like, when formulated in a
> general-purpose language retrofitted to better support such formulations
> ("better" as in "better than nothing") - a language which, by the way, would
> surely happen to be unsuited for a POV-Ray SDL.
This seems to be true, where would I find some *real* OOP to look at?
David
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
scott wrote:
>>> Check the povray.pov4.discussion.general group, particularly the
>>> threads "Next Generation SDL Brainstorming" and "Next Generation SDL:
>>> What's wrong with Lua, JavaScript, ...".
>>
>> Thanks, Scott,
>> I see only 4 threads and neither of these. Thunderbird is giving me
>> problem?
>
> I don't use Thunderbird, but maybe someone else might be able to help
> you. In Windows Live Mail you can choose "Tools -> Get Next <X> Headers"
> where X is the value you set for how many to download at a time - maybe
> there is something similar?
>
> If not then you can always use the web view here:
>
> http://news.povray.org/povray.pov4.discussion.general/
>
>
Thanks. I haven't had this problem with the other Newgroups. I'll look
at it via
the web.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Neeum Zawan wrote:
> On 07/24/09 07:38, David H. Burns wrote:
>>> Now you guys know how *I* feel when I try to tell people that
>>> functional programming is a good idea. ;-) Nobody ever seems to
>>> believe me...
>>
>> You encourage me. But we seem to be out of fad. ;-) :) (An attachment
>
> Hardly, What you like is procedural. Functional programming is a
> whole other beast altogether, where you normally don't do explicit loops
> but use constructs like map, filter, etc. Lots of lambdas thrown in as
> well.
>
So your not out of fad. My ignorance is showing. I'm not a professional
programmer
and have done little except for my own amusement. That being so much of
your
terminology is unfamiliar to me. I think that this thread is the only
time I have
actually talked to anyone specifically about programming theory --
although I did
a lot of reading a number of years ago.
You encourage me anyway.
David
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
clipka wrote:
> (BTW, did you know that your working style costs jobs? 'Cause as long as people
> program software instead of developing it, you can't just outsource the coding
> part to India... :P)
Heh. I'll keep that in mind.
--
Darren New, San Diego CA, USA (PST)
"We'd like you to back-port all the changes in 2.0
back to version 1.0."
"We've done that already. We call it 2.0."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
scott wrote:
> I wonder if it would it be possible for POV to expose its core functions
> in a standard way (eg in a dll for windows), and then you can access
> them from any programming language you like. The SDL parser just needs
> to be a special case that parses the file and calls the same POV core
> functions that you can from your own code.
I think this came up a number of times in the past. I remember getting
brutalized for suggesting CIL ;-)
--
Darren New, San Diego CA, USA (PST)
"We'd like you to back-port all the changes in 2.0
back to version 1.0."
"We've done that already. We call it 2.0."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 07/24/09 09:51, David H. Burns wrote:
> I think the concept of "object" is a real advance in programming but
> "OOP" seems
> a lot more than simpling making use of "objects" which "contain" both
> data members
> and functions ("methods")
As I said before, you have a "ball" variable, which is just a sphere
with everything you've defined (coordinates, texture, etc).
It has data members, which would be the aforementioned items
(coordinates, pigments, etc). It also may have methods, like rotate,
translate, etc. You could do:
ball.translate(1, 3, 5)
to translate it by <1, 3, 5>.
(The syntax may be a bit different - that's a minor issue).
I think you're worried that you'll somehow have to put all your code
into the methods of objects. Heck, for simple scenes, I doubt you'll
have to code _any_ methods. POV-Ray will provide standard methods to all
objects (like rotate, translate, etc), which you will merely use.
If you want to do regular for loops, etc, it need not be part of any
object method, but in your "regular" code. No one said that the new SDL
will force everything to reside in an object like Java does.
--
Cut my pizza in six slices, please; I can't eat eight.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"David H. Burns" <dhb### [at] cherokeetel net> wrote:
> I do kind of think
> in terms of "objects" when using Pov-Ray, but I wouldn't call that "OOP
> (= Object
> Oriented Programming) thinking", even if that phrase means
> anything--which I doubt.
Well, I do agree that "OOP thinking" is somewhat fuzzy.
Let me rephrase the whole smash like this:
What others call "OOP thinking" might be more familiar to you than you may be
aware of.
> It might be more accurate to say that I am writing code which conforms
> to the syntax dictated by
> the SDL -- regardless of what kind of thinking leads to it. As I have
> said several times before:
> I think the concept of "object" is a real advance in programming but
> "OOP" seems
> a lot more than simpling making use of "objects" which "contain" both
> data members
> and functions ("methods")
Yes; what you describe would be "encapsulation", which is just one major
building block of OOP. As I mentioned earlier, another important one is
"polymorphism", which you can think of as the ability to equip multiple
different objects with methods that have the same name and parameters, but
different code to match the object's data structure. An example is POV-Ray's
"sphere", "box" and all the other primitives using the very same syntax to
transform, apply textures, etc.
A third concept frequently encountered in OOP, "inheritance", on the other hand,
is in my eyes not really an essential part of OOP, but instead just a mechanism
(albeit a powerful one) to manage issues arising from polymorphism, both
regarding redundancy (different objects may be similar enough that parts of
their data structures and methods can be implemented in the very same way, so
it would be a waste of time to write and maintain that same code twice) as well
as object compatibility (compile-time detection of potential attempts to invoke
methods on objects that don't have them).
Atop of this are a bunch of design patterns which are associated with OOP,
probably for the sole reason that they're making such heavy use of
encapsulation and polymorphism that it would be extremely cumbersome to express
them in a non-OOP language.
Some other stuff often associated with OOP languages just happen to have become
popular in mainstream languages at the same time as OOP; for instance
"overloading" of functons (defining multiple functions of the same name but
with different parameter types); model-view-controller architecture (dividing
an application into three components referred to as model, view and
controller); to name a few examples.
>
> >you only know how
> > typical end results from such thought processes look like, when formulated in a
> > general-purpose language retrofitted to better support such formulations
> > ("better" as in "better than nothing") - a language which, by the way, would
> > surely happen to be unsuited for a POV-Ray SDL.
>
> This seems to be true, where would I find some *real* OOP to look at?
I don't know whether there exists such a thing as "real OOP to look at".
Whatever code you look at, if you're not familiar with the language you'll
probably see more of the language's peculiaritis than you'll see of the
programmer's original thoughts.
Academic languages are peculiar anyway; and non-academic languages tend to
accumulate traits over time that are peculiar because the original language
didn't have them.
In the case of POV-Ray, I still have to come across some language that wouldn't
outweigh the benefits by its peculiarities. The current POV-Ray SDL is so
well-suited to its basic task that it would be imprudent to go very far from
that, as far as the effective syntax is concerned. The only problem with it is
that it is particularly ill-suited for the non-basic tasks people want to use
it for these days. It is exceptionally good for *describing* a scene, but also
exceptionally bad for *generating* it (which doesn't mean it lacks the power;
being Turing-complete, you can do anything with the currend SDL; but what it
does lack is performance, some more consistency, and some more support for
OOP).
So what I'd go for is a language that is deliberately designed to be very
remniscient of the current SDL when it comes to describing scene elements, and
as straightforward when it comes to simple scene-generation tasks (like, say,
placing 100 spheres in a row) - any language imposing some overhead for these
two would be ill-suited for POV-Ray.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New <dne### [at] san rr com> wrote:
> I think this came up a number of times in the past. I remember getting
> brutalized for suggesting CIL ;-)
.... and rightly so ;)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thanks. This is the best and most concise explanation of the basic
tenets of OOP that
I have read. Much better, for instance, than that in "OOP for Dummies".
clipka wrote:
>> This seems to be true, where would I find some *real* OOP to look at?
>
> I don't know whether there exists such a thing as "real OOP to look at".
> Whatever code you look at, if you're not familiar with the language you'll
> probably see more of the language's peculiaritis than you'll see of the
> programmer's original thoughts.
Perhaps I should have said where could I find some simple examples of
good OOP
programming. Any that would be very useful to me might be hard to find.
I have some
Python code for producing a Windows GUI "wrapper" around old Fortran
code. The results
are quite impressive. It's likely that this code would be as good
example as I can find --
though it's not especially simple.
>
> Academic languages are peculiar anyway; and non-academic languages tend to
> accumulate traits over time that are peculiar because the original language
> didn't have them.
>
The current POV-Ray SDL is so
> well-suited to its basic task that it would be imprudent to go very far from
> that, as far as the effective syntax is concerned.
Amen!
:) David
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
David H. Burns wrote:
> Chambers wrote:
>> Just out of curiosity (but you keep saying things like this, so I have
>> to ask), where have you seen OOP programming?
>>
>
> Your point is well taken. I have *never* seen OOP *programming*.
<snip>
> To actually see OOP "programming", I suppose I would have to see some
> one actually coding in OOP.
I don't think you understood my point. I'm not talking about watching
someone as they write code. I'm talking about the source code itself.
What source code have you seen that scared you so badly away from OOP?
My guess (and it's just a hunch at this point), is that the OOP itself
isn't what scared you, but rather the complexity of the program. If
this is the case, then you're almost certainly guaranteed that the
program would have looked *worse* if it weren't OO.
Something that people don't tend to believe: programming is *hard*. It
is *not* a simple matter to sit down with a sheet of requirements, and
pound out the class (though having a properly written spec makes it
easier). And, believe it or not, most programmers' jobs could *not* be
done by a bunch of monkeys.
It's not for everyone, and some people are more suited to using the
programs they have than writing new ones.
--
Chambers
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
clipka wrote:
> Chambers <Ben### [at] gmail com_no_underscores> wrote:
>>>> Shouldn't that be "the Buck"? ;)
>>> ??
>> As in, David K Buck :)
>
> Ah - now here comes light ;)
>
> But no: Leader of the dev team is currently Chris Cason :P
I know, but I find it hard to pass up an opportunity for a good pun :)
--
Chambers
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
clipka wrote:
> (BTW, did you know that your working style costs jobs? 'Cause as long as people
> program software instead of developing it, you can't just outsource the coding
> part to India... :P)
In other words, he saves money by not creating *extra* work that his
employers have to pay for.
Way to go Darren, you deserve a raise! :)
--
Chambers
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
scott wrote:
> I wonder if it would it be possible for POV to expose its core functions
> in a standard way (eg in a dll for windows), and then you can access
> them from any programming language you like.
I propose Ook!
--
Chambers
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp wrote:
> David H. Burns <dhb### [at] cherokeetel net> wrote:
>> Invisible wrote:
>
>>> 2. What would be so bad about this being true?
>> It would be too complex to be usable by ordinary folk (i.e. me).
>
> And exactly how do you know this?
>
OOP is the first three letters of oops!
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Chambers wrote:
> Something that people don't tend to believe: programming is *hard*. It
> is *not* a simple matter to sit down with a sheet of requirements, and
> pound out the class (though having a properly written spec makes it
> easier). And, believe it or not, most programmers' jobs could *not* be
> done by a bunch of monkeys.
>
I drafted a rather longer reply to this, but thought better of it. I'll
say only this
programming is *not* hard, but it cane be made hard.
David
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Chambers <Ben### [at] gmail com_no_underscores> wrote:
> > I wonder if it would it be possible for POV to expose its core functions
> > in a standard way (eg in a dll for windows), and then you can access
> > them from any programming language you like.
>
> I propose Ook!
Stupid monkey.
(*hands over banana*)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Sat, 25 Jul 2009 10:48:03 EDT, "clipka" <nomail@nomail> wrote:
>Chambers <Ben### [at] gmail com_no_underscores> wrote:
>> > I wonder if it would it be possible for POV to expose its core functions
>> > in a standard way (eg in a dll for windows), and then you can access
>> > them from any programming language you like.
>>
>> I propose Ook!
>
>Stupid monkey.
>
>(*hands over banana*)
>
>
Ooo! Big trouble when the librarian gets you :-)
--
Regards
Stephen
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"David H. Burns" <dhb### [at] cherokeetel net> wrote:
> I drafted a rather longer reply to this, but thought better of it. I'll
> say only this
> programming is *not* hard, but it cane be made hard.
As a professional SW developer, I can tell for sure that it depends a lot on the
size (and even more so complexity) of the project, and the operational
parameters to match (memory limits, performance requirements, stuff like that).
If your projects are the size and complexity of a typical POV-Ray scene with
some occasional loops, you're right: That's not hard at all.
If however your project is a POV-Ray animation employing some mechanics
simulation, and you don't have access to a mech sim framework developed by
someone else already, you *might* come to the conclusion that programming can
also be hard all by itself.
And if you were to develop software for a bluetooth handsfree unit to be
integrated into a car, or a modern computer game, you'll certainly find how
hard programming can be.
One problem with OOP support in many mainstream languages is probably this:
They're designed to manage complexity in medium-sized projects (for really
large projects, even those languages may not be good enough); if they do that
well, nobody will complain about the additional overhead they impose, because
it really pays off a lot. However, in very small projects this overhead becomes
more of a burden than a benefit, because the projects don't really have much
complexity in need of being managed.
Mind you, this overhead is imposed not by object-oriented programming as such,
but by the languages. The more formal it is, the more suited it is to manage
complexity. But, of course, that formalism makes it also less suited for
programs you could throw together in a few hours if it weren't for the
formalisms.
I do love Microsoft's C# programming language and IDE: It's really one of the
most powerful environments I have ever used for development, and it's really a
pleasure to use it. I can't think of anything better suited for projects the
size an experienced hobbyist programmer could ever hope to pull off alone.
However, when I develop, say, a small straightforward command line tool I expect
to throw together in a matter of two or three days, C/C++ is actually my
favorite weapon: I can start off with plain old-school C imperative programming
(interspersed with some C++ syntax that has nothing to to with OOP, like line
comments, references, bool data types and the like); if I then happen to
encounter some unexpected complexity, I can throw in a bit of C++ to define
some objects anytime, but keep the program C-style otherwise.
This is the kind of OOP support I'd expect for a POV-Ray SDL: As long as your
project is straightforward, it doesn't bother you with any formalism
whatsoever. But when the task at hand gets complex, that OOP support is right
there for you to use, with all the formalism you need.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Stephen <mcavoysAT@aolDOTcom> wrote:
> >> I propose Ook!
> >
> >Stupid monkey.
> >
> >(*hands over banana*)
> >
> >
>
> Ooo! Big trouble when the librarian gets you :-)
Ook.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Sat, 25 Jul 2009 12:42:08 EDT, "clipka" <nomail@nomail> wrote:
>Stephen <mcavoysAT@aolDOTcom> wrote:
>> >> I propose Ook!
>> >
>> >Stupid monkey.
>> >
>> >(*hands over banana*)
>> >
>> >
>>
>> Ooo! Big trouble when the librarian gets you :-)
>
>Ook.
>
>
No use trying to soft soap now Oook!
:)
--
Regards
Stephen
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
clipka wrote:
> "David H. Burns" <dhb### [at] cherokeetel net> wrote:
>> I drafted a rather longer reply to this, but thought better of it. I'll
>> say only this
>> programming is *not* hard, but it cane be made hard.
>
> As a professional SW developer, I can tell for sure that it depends a lot on the
> size (and even more so complexity) of the project, and the operational
> parameters to match (memory limits, performance requirements, stuff like that).
>
> If your projects are the size and complexity of a typical POV-Ray scene with
> some occasional loops, you're right: That's not hard at all.
>
> If however your project is a POV-Ray animation employing some mechanics
> simulation, and you don't have access to a mech sim framework developed by
> someone else already, you *might* come to the conclusion that programming can
> also be hard all by itself.
>
> And if you were to develop software for a bluetooth handsfree unit to be
> integrated into a car, or a modern computer game, you'll certainly find how
> hard programming can be.
>
>
> One problem with OOP support in many mainstream languages is probably this:
> They're designed to manage complexity in medium-sized projects (for really
> large projects, even those languages may not be good enough); if they do that
> well, nobody will complain about the additional overhead they impose, because
> it really pays off a lot. However, in very small projects this overhead becomes
> more of a burden than a benefit, because the projects don't really have much
> complexity in need of being managed.
>
> Mind you, this overhead is imposed not by object-oriented programming as such,
> but by the languages. The more formal it is, the more suited it is to manage
> complexity. But, of course, that formalism makes it also less suited for
> programs you could throw together in a few hours if it weren't for the
> formalisms.
>
> I do love Microsoft's C# programming language and IDE: It's really one of the
> most powerful environments I have ever used for development, and it's really a
> pleasure to use it. I can't think of anything better suited for projects the
> size an experienced hobbyist programmer could ever hope to pull off alone.
>
> However, when I develop, say, a small straightforward command line tool I expect
> to throw together in a matter of two or three days, C/C++ is actually my
> favorite weapon: I can start off with plain old-school C imperative programming
> (interspersed with some C++ syntax that has nothing to to with OOP, like line
> comments, references, bool data types and the like); if I then happen to
> encounter some unexpected complexity, I can throw in a bit of C++ to define
> some objects anytime, but keep the program C-style otherwise.
>
> This is the kind of OOP support I'd expect for a POV-Ray SDL: As long as your
> project is straightforward, it doesn't bother you with any formalism
> whatsoever. But when the task at hand gets complex, that OOP support is right
> there for you to use, with all the formalism you need.
>
>
Your points are well taken, I should have said programing is not
*fundamentally* difficult.
A particular programming task may be difficult because it require a lot
of time and effort, learning
the idiosyncrasies of all the systems involved and a lot of trial and
error. A great deal of
experience programming may also be required. But fundamentally,
programming is not difficult.
But it can be made so.
David
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
David H. Burns wrote:
> Your points are well taken, I should have said programing is not
> *fundamentally* difficult.
> A particular programming task may be difficult
This, to me, sounds like saying "Chess isn't hard, only the opponents are!"
--
Chambers
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
David H. Burns wrote:
> Your points are well taken, I should have said programing is not
> *fundamentally* difficult.
It is fundamentally difficult. It's as fundamentally difficult as any
applied mathematics. For sufficiently small problems, you may be able to do
it in spite of it being fundamentally difficult.
> programming is not difficult.
Then why do you have such a hard time understanding simple things like OO
programs? :-)
--
Darren New, San Diego CA, USA (PST)
"We'd like you to back-port all the changes in 2.0
back to version 1.0."
"We've done that already. We call it 2.0."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Chambers wrote:
> David H. Burns wrote:
>> Your points are well taken, I should have said programing is not
>> *fundamentally* difficult.
>> A particular programming task may be difficult
>
> This, to me, sounds like saying "Chess isn't hard, only the opponents are!"
>
This is a poor analogy. In chess the major difficulty is the opponent,
but there is no opponent
in programming. But pursuing it anyway, the rules and moves of chess are
relatively
simple. One can easily learn and use them, however the rules and moves
*could* be made so
complex that it would be almost impossible to play even against an easy
opponent.
David
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |