POV-Ray : Newsgroups : povray.off-topic : This is the sort of brokenness... Server Time
10 Oct 2024 14:18:40 EDT (-0400)
  This is the sort of brokenness... (Message 5 to 14 of 164)  
<<< Previous 4 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: nemesis
Subject: Re: This is the sort of brokenness...
Date: 16 Mar 2009 18:42:30
Message: <49bed5d6$1@news.povray.org>
Darren New escreveu:
> Warp wrote:
>>   In my little experience, trying to use a programming paradigm (eg. OOP)
>> with a language which has no specific support for that paradigm (eg.
>> traditional lisp or scheme, or C) only creates a ton of kludges.
> 
> Actually, LISP has excellent support for OO. It has closures (which are 
> objects without the types, not unlike javascript objects) and it has 
> macros that let you Do The Right Thing with the syntax and integrate it 
> cleanly into the language. It's not going to look like Java/C++/C#/etc 
> classes, but I'd disagree it's a kludge.

More than that, Common Lisp has CLOS:
http://en.wikipedia.org/wiki/Common_Lisp_Object_System

> I don't remember scheme enough to know how clean it is, and I'll agree 
> with you on the C part. :-)  And that's not to say there aren't things 
> that would be very difficult to do in LISP without native support built 
> into the language (like some forms of control flow, for example).

Are you kidding?  One of the main strenghts of Lisp is its macro system. 
  Not dumb C preprocessing, a metaprogramming features which allows you 
to create nice new syntax for any control flow you want.

See:
http://www.paulgraham.com/onlisp.html

Scheme itself lives up to its original goal as a minimalist and 
incredibly flexible and powerful language.  See for instance an 
implementation of a full-fledged, purely functional object-system:
http://okmij.org/ftp/Scheme/index.html#pure-oo

This is done purely with functions and will look awkward for Warp in the 
way they are called, but thing is:  one layer of macros later and it 
looks just as integrated into the language as if OO was always there.


Post a reply to this message

From: Darren New
Subject: Re: This is the sort of brokenness...
Date: 16 Mar 2009 19:12:58
Message: <49bedcfa$1@news.povray.org>
nemesis wrote:
> More than that, Common Lisp has CLOS:
> http://en.wikipedia.org/wiki/Common_Lisp_Object_System

Yes. I was trying to describe that it doesn't have to be built in, tho. :-) 
I like CLOS.

(I don't know if CLOS counts as "built in" or not.)

>> I don't remember scheme enough to know how clean it is, and I'll agree 
>> with you on the C part. :-)  And that's not to say there aren't things 
>> that would be very difficult to do in LISP without native support 
>> built into the language (like some forms of control flow, for example).
> 
> Are you kidding?  One of the main strenghts of Lisp is its macro system.

Didn't I say that? :-)

> http://okmij.org/ftp/Scheme/index.html#pure-oo

Cool. Thanks for that.

-- 
   Darren New, San Diego CA, USA (PST)
   My fortune cookie said, "You will soon be
   unable to read this, even at arm's length."


Post a reply to this message

From: nemesis
Subject: Re: This is the sort of brokenness...
Date: 16 Mar 2009 20:35:01
Message: <web.49beefea11b2c188b5d35d190@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> (I don't know if CLOS counts as "built in" or not.)

It is.

> > http://okmij.org/ftp/Scheme/index.html#pure-oo
>
> Cool. Thanks for that.

That guy has all sorts of cool stuff, either in Scheme, Haskell or C++.

The "On Lisp" book by Paul Graham is very good too.  It's available in PDF and
explores Lisp macros as no other.


Post a reply to this message

From: Darren New
Subject: Re: This is the sort of brokenness...
Date: 16 Mar 2009 20:39:15
Message: <49bef133@news.povray.org>
nemesis wrote:
> The "On Lisp" book by Paul Graham is very good too.  It's available in PDF and
> explores Lisp macros as no other.

Yep. Got it, read it. :-) I wish I had a use for it. :-)

-- 
   Darren New, San Diego CA, USA (PST)
   My fortune cookie said, "You will soon be
   unable to read this, even at arm's length."


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: This is the sort of brokenness...
Date: 16 Mar 2009 21:15:02
Message: <49bef995@news.povray.org>
Warp wrote:
>   In my little experience, trying to use a programming paradigm (eg. OOP)
> with a language which has no specific support for that paradigm (eg.
> traditional lisp or scheme, or C) only creates a ton of kludges.

Heh, did you see the GObject framework?


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: This is the sort of brokenness...
Date: 16 Mar 2009 21:18:30
Message: <49befa66@news.povray.org>
Darren New wrote:
> ... that I hate seeing in a popular language. Backwards compatibility for
> a language already rushed out the door is really a killer, IMO.
> 
> http://vijaymathew.wordpress.com/2009/03/13/dangerous-designs/

OMG, *that* is how they implemented it?!


Post a reply to this message

From: nemesis
Subject: Re: This is the sort of brokenness...
Date: 16 Mar 2009 22:55:00
Message: <web.49bf10b311b2c188b5d35d190@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> nemesis wrote:
> > The "On Lisp" book by Paul Graham is very good too.  It's available in PDF and
> > explores Lisp macros as no other.
>
> Yep. Got it, read it. :-) I wish I had a use for it. :-)

Dude, slow down on that coffee! X^D


Post a reply to this message

From: Darren New
Subject: Re: This is the sort of brokenness...
Date: 16 Mar 2009 23:28:23
Message: <49bf18d7$1@news.povray.org>
nemesis wrote:
> Darren New <dne### [at] sanrrcom> wrote:
>> nemesis wrote:
>>> The "On Lisp" book by Paul Graham is very good too.  It's available in PDF and
>>> explores Lisp macros as no other.
>> Yep. Got it, read it. :-) I wish I had a use for it. :-)
> 
> Dude, slow down on that coffee! X^D

Heh. Got it, read it many moons ago.

-- 
   Darren New, San Diego CA, USA (PST)
   My fortune cookie said, "You will soon be
   unable to read this, even at arm's length."


Post a reply to this message

From: Darren New
Subject: Re: This is the sort of brokenness...
Date: 16 Mar 2009 23:29:28
Message: <49bf1918$1@news.povray.org>
Nicolas Alvarez wrote:
> OMG, *that* is how they implemented it?!

Yeah. Generics are kludged in approximately the same way, with the extra 
excuse that it allows generic code to interoperate with previously compiled 
non-generic code.

They've locked themselves into a specific JVM, and nothing can change that now.

-- 
   Darren New, San Diego CA, USA (PST)
   My fortune cookie said, "You will soon be
   unable to read this, even at arm's length."


Post a reply to this message

From: nemesis
Subject: Re: This is the sort of brokenness...
Date: 17 Mar 2009 01:05:00
Message: <web.49bf2f4911b2c188b5d35d190@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> sounds like you could argue in favor of languages like brainfuck which
> have a minimal set of instructions, yet are still Turing-complete.

Scheme:
Minimalist.  check
Power. check
Flexibility. check

Brainfuck:
Minimalist.  check

>   Eg. just because tail recursion is enough to perform any kind of
> looping construct doesn't necessarily mean that special looping constructs
> wouldn't be a useful tool.

That's why you got for-each in the standard and a few more. (which, obviously,
are macros wrapping tail-recursive calls)


Post a reply to this message

<<< Previous 4 Messages Goto Latest 10 Messages Next 10 Messages >>>

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