POV-Ray : Newsgroups : povray.off-topic : Programming language development Server Time
5 Sep 2024 07:23:56 EDT (-0400)
  Programming language development (Message 99 to 108 of 108)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Darren New
Subject: Re: Programming language development
Date: 6 Oct 2009 12:06:23
Message: <4acb6aff$1@news.povray.org>
Invisible wrote:
> drastically, *drastically* quicker to type this as text. The diagramming 
> tool makes it take 10 times longer to do (more or less) the same job.

Which is why you need to be able to go back and forth, you see.

The *problem* with being able to go back and forth is that it really doesn't 
add a whole lot of value if the two forms are isomorphic.

Which is why having a CASE tool generate a textual skeleton of code, and 
then being able to change that skeleton and have the CASE tool able to 
handle the changes, is probably the most effective way.

-- 
   Darren New, San Diego CA, USA (PST)
   I ordered stamps from Zazzle that read "Place Stamp Here".


Post a reply to this message

From: Darren New
Subject: Re: Programming language development
Date: 6 Oct 2009 12:17:24
Message: <4acb6d94$1@news.povray.org>
clipka wrote:
> - even though it does appear to be mainstream indeed, it doesn't seem to 
> fit the bill of "Non-OO ... (imperative) language".

It's not OO. There's a library to make it look like it's OO. When you use 
that library, each object is represented as a global procedure. It can kind 
of sort of look OO, but it isn't.

> As for Ada: When I think "mainstream", I don't usually think avionics, 
> weapon systems or spacecraft - or any other embedded or real-time 
> application, for that matter.

OK. When I say "mainstream", I mean a language that's actually used for 
actual development by people other than those at the same company where the 
language was invented. I rule out things like Blue and Sing# and such, the 
experimental languages crafted for a specific program to be written in.

I would say anything where you can go to Amazon and buy a textbook and then 
download the compiler would have to be mainstream. If you have to download 
the whitepaper that describes the language? That's not mainstream.

> As I said, it depends on the runtime. If for instance the runtime would 
> store object references as a combination of a "data address" and a "type 
> identifier", it would be more than problematic to add data fields (due 
> to inability to move the object on the heap),

I think we can safely rule out upgrading running executable code for systems 
that don't have automatic memory management.

> or to "upgrade" only some 
> objects to the new implementation; 

Nah. You'd just patch the type in the pointers that point to the new objects.

> if the runtime instead stores object 
> references as pointers to memory blocks including both the data and a 
> virtual method table, data size may still not grow, but implementation 
> could be changed for individual objects of a type; and a runtime that 
> happens to use chained references for garbage collection would have all 
> the necessary power to actually relocate objects on the heap, thus 
> allowing for arbitrary changes to the data structure. With such a 
> runtime, your "object network" can be arbitrarily complex. Similar 
> flexibility can be achieved by adding a level of indirection between the 
> reference and the actual data.

The problem you might be missing is the existence of return addresses on the 
stack that index into the code you're changing. If your objects sit around a 
long time in various networks, and you can't tell which bits of running code 
are using which objects (as in, have methods of those objects on the stack 
for that thread), then you're going to have a hard time replacing the 
objects without clobbering code that's already running. You're also going to 
have a hard time running the old code in one thread and the new code in 
another thread both using the same shared object.

I guess you could make the upgrades of an entire class at once, but you'd 
have to make sure nobody is executing any methods in that class when you did 
it. (I'm also implicitly assuming for good reason that few people are going 
to want to upgrade a single-threaded process while it's running.)

It's sort of like trying to reorganize a SQL table while there's 
transactions in progress on it. Messy.

-- 
   Darren New, San Diego CA, USA (PST)
   I ordered stamps from Zazzle that read "Place Stamp Here".


Post a reply to this message

From: Orchid XP v8
Subject: Re: Programming language development
Date: 6 Oct 2009 13:51:10
Message: <4acb838e$1@news.povray.org>
clipka wrote:

> My copy of Wikipedia categorizes Tcl as "multi-paradigm".

...you downloaded the Internets?!

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: clipka
Subject: Re: Programming language development
Date: 6 Oct 2009 15:35:52
Message: <4acb9c18$1@news.povray.org>
Darren New schrieb:
> clipka wrote:
>> - even though it does appear to be mainstream indeed, it doesn't seem 
>> to fit the bill of "Non-OO ... (imperative) language".
> 
> It's not OO. There's a library to make it look like it's OO. When you 
> use that library, each object is represented as a global procedure. It 
> can kind of sort of look OO, but it isn't.

Given that I have the impression that you accept as OO only what has a 
certain runtime structure, instead of what aids in implementing an OO 
design, I prefer to trust Wikipedia on this matter.

If it /feels/ like OO (i.e. it supports your attempts at implementing an 
OO design), it /is/ OO.


>> As for Ada: When I think "mainstream", I don't usually think avionics, 
>> weapon systems or spacecraft - or any other embedded or real-time 
>> application, for that matter.
> 
> OK. When I say "mainstream", I mean a language that's actually used for 
> actual development by people other than those at the same company where 
> the language was invented. I rule out things like Blue and Sing# and 
> such, the experimental languages crafted for a specific program to be 
> written in.

That would (for most part) match "production" language in my set of 
definitions.

To be mainstream, something really needs to be... well, you know, in the 
/main/ stream.

You wouldn't call some clothes fashion to be mainstream just because 
people sell the clothes instead of sewing them at home for their own 
personal use, would you? Or call some musical style mainstream just 
because you can buy that type of music on audio CDs?


Post a reply to this message

From: clipka
Subject: Re: Programming language development
Date: 6 Oct 2009 15:40:00
Message: <4acb9d10$1@news.povray.org>
Orchid XP v8 schrieb:

>> My copy of Wikipedia categorizes Tcl as "multi-paradigm".
> 
> ...you downloaded the Internets?!

Part of it, yes - typically every time I call up a page :-)


Post a reply to this message

From: Darren New
Subject: Re: Programming language development
Date: 6 Oct 2009 16:04:54
Message: <4acba2e6$1@news.povray.org>
clipka wrote:

 > you accept as OO only what has a certain runtime structure

No, I call something OO if it has more "OO" to it than (say) stdio.h. :-) It 
needs objects, and data associated with objects, and stuff like that.

> If it /feels/ like OO (i.e. it supports your attempts at implementing an 
> OO design), it /is/ OO.

Tcl's an extensible language. People have written libraries that emulate 
some aspects of OO.  Tcl is no more OO than C is OO because someone invented 
cfront.  Just like the existence of Candygram doesn't make Python an 
actor-based language.

Tcl's OO works by creating a procedure for each object. Invoking that 
procedure causes it to use the first argument as a string to look up the 
method to run, and the name of the procedure itself as an index into a 
global hashtable to find the data associated with the object. I guess if you 
squint hard, you could say it supports OO.  It's not what I'd call an OO 
language, tho. It's a procedural imperative language with an optional and 
not widely used lump of library that rewrites procedural code to look sorta 
OO if you don't peer too close.

> That would (for most part) match "production" language in my set of 
> definitions.

Fair enough. That, then. :)  I was trying to distinguish "one-off 
experimental languages designed specifically to aboid what I was talkign 
about" from "real" languages.  (Altho, honestly, at this point I've 
forgotten what I'm talking about.)

> To be mainstream, something really needs to be... well, you know, in the 
> /main/ stream.

> You wouldn't call some clothes fashion to be mainstream just because 
> people sell the clothes instead of sewing them at home for their own 
> personal use, would you? Or call some musical style mainstream just 
> because you can buy that type of music on audio CDs?

No, but I'd call police uniforms "mainstream" even tho only policemen use 
them. :-)

-- 
   Darren New, San Diego CA, USA (PST)
   I ordered stamps from Zazzle that read "Place Stamp Here".


Post a reply to this message

From: Warp
Subject: Re: Programming language development
Date: 6 Oct 2009 17:15:49
Message: <4acbb385@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> clipka wrote:

>  > you accept as OO only what has a certain runtime structure

> No, I call something OO if it has more "OO" to it than (say) stdio.h. :-) It 
> needs objects, and data associated with objects, and stuff like that.

> > If it /feels/ like OO (i.e. it supports your attempts at implementing an 
> > OO design), it /is/ OO.

> Tcl's an extensible language. People have written libraries that emulate 
> some aspects of OO.  Tcl is no more OO than C is OO because someone invented 
> cfront.  Just like the existence of Candygram doesn't make Python an 
> actor-based language.

  I think one should distinguish between Object-Oriented Design (OOD) and
Object-Oriented Programming (OOP). While the distinction might often be
rather fuzzy, and often they are very tied together (because, after all,
implementing an OOD is often best done with an OOP language), they can
still be used independently.

  For example, many programs have a full-fledged OOD but are then
implemented in a language which supports little to no OOP, most
typically C (and even when OOP is more or less "emulated" with C, only
very few actual OOP techniques are used).

  (The other extreme might also be possible in some cases, ie. "abusing"
an OOP language for a design which has very little object-orientedness
in it. Could eg. be more akin to objects being "abused" for functional
design and programming techniques.)

-- 
                                                          - Warp


Post a reply to this message

From: Darren New
Subject: Re: Programming language development
Date: 6 Oct 2009 17:27:13
Message: <4acbb631$1@news.povray.org>
Warp wrote:
>   For example, many programs have a full-fledged OOD but are then
> implemented in a language which supports little to no OOP, most
> typically C 

Yep. That's what I'm saying. You can do "OOP" in any language, but a 
language has to support it natively for *me* to call it an "OO language."

 > an OOP language for a design which has very little object-orientedness

Sure. Any time you give other processes access to all the member variables, 
or have most of the routines just static functions, or etc. :-)

-- 
   Darren New, San Diego CA, USA (PST)
   I ordered stamps from Zazzle that read "Place Stamp Here".


Post a reply to this message

From: Warp
Subject: Re: Programming language development
Date: 6 Oct 2009 17:59:38
Message: <4acbbdca@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
>  > an OOP language for a design which has very little object-orientedness

> Sure. Any time you give other processes access to all the member variables, 
> or have most of the routines just static functions, or etc. :-)

  I think singletons are a completely valid OOP technique. (OTOH, if your
entire program consists of singletons, it becomes a bit dubious whether
your program is object-oriented at all...)

-- 
                                                          - Warp


Post a reply to this message

From: Darren New
Subject: Re: Programming language development
Date: 6 Oct 2009 19:03:32
Message: <4acbccc4$1@news.povray.org>
Warp wrote:
> Darren New <dne### [at] sanrrcom> wrote:
>>  > an OOP language for a design which has very little object-orientedness
> 
>> Sure. Any time you give other processes access to all the member variables, 
>> or have most of the routines just static functions, or etc. :-)
> 
>   I think singletons are a completely valid OOP technique. (OTOH, if your
> entire program consists of singletons, it becomes a bit dubious whether
> your program is object-oriented at all...)

Sure.  I meant if all the objects/classes in the program have all the member 
variables public and all the routines static, you're just using OO for the 
modularity.  Doing it that way occasionally doesn't hurt.

-- 
   Darren New, San Diego CA, USA (PST)
   I ordered stamps from Zazzle that read "Place Stamp Here".


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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