POV-Ray : Newsgroups : povray.off-topic : This is the sort of brokenness... Server Time
6 Sep 2024 05:17:04 EDT (-0400)
  This is the sort of brokenness... (Message 155 to 164 of 164)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Darren New
Subject: Re: This is the sort of brokenness...
Date: 23 Mar 2009 12:19:18
Message: <49c7b686$1@news.povray.org>
Invisible wrote:
> Darren New wrote:
> 
>> http://vijaymathew.wordpress.com/2009/03/13/dangerous-designs/
> 
> Why write
> 
>   (define (addn n) (lambda (k) (+ n k)))
> 
> when you can just say
> 
>   addn n = (+n)

Shouldn't that be addn n = (n+) ?

-- 
   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: Invisible
Subject: Re: This is the sort of brokenness...
Date: 23 Mar 2009 12:34:43
Message: <49c7ba23@news.povray.org>
Darren New wrote:
> Invisible wrote:
>> Why write
>>
>>   (define (addn n) (lambda (k) (+ n k)))
>>
>> when you can just say
>>
>>   addn n = (+n)
> 
> Shouldn't that be addn n = (n+) ?

It doesn't matter. Addition is usually a commutative operation.


Post a reply to this message

From: nemesis
Subject: Re: This is the sort of brokenness...
Date: 23 Mar 2009 13:06:57
Message: <49c7c1b1@news.povray.org>
I see you're back! :D

Invisible escreveu:
> Darren New wrote:
> 
>> http://vijaymathew.wordpress.com/2009/03/13/dangerous-designs/
> 
> Why write
> 
>   (define (addn n) (lambda (k) (+ n k)))
> 
> when you can just say
> 
>   addn n = (+n)
> 
> ? ;-)

Because in plain Scheme you can't?

> (This is one of the reasons why Haskell's ever-expanding set of features 
> worries me. If people need all these extra features, doesn't that kind 
> of indicate that the language is broken?)

If I'm not wrong, core Haskell is about as clean and simple as plain 
Scheme, both based on lambda calculus.  Building upon solid, flexible 
and simple infrastructure is not a bad idea.


Post a reply to this message

From: Warp
Subject: Re: This is the sort of brokenness...
Date: 23 Mar 2009 13:58:11
Message: <49c7cdb3@news.povray.org>
Invisible <voi### [at] devnull> wrote:
> > Shouldn't that be addn n = (n+) ?

> It doesn't matter. Addition is usually a commutative operation.

  Unless you are using the + operator to, for example, concatenate strings...

-- 
                                                          - Warp


Post a reply to this message

From: Invisible
Subject: Re: This is the sort of brokenness...
Date: 24 Mar 2009 05:55:56
Message: <49c8ae2c@news.povray.org>
>>> Shouldn't that be addn n = (n+) ?
> 
>> It doesn't matter. Addition is usually a commutative operation.
> 
>   Unless you are using the + operator to, for example, concatenate strings...

Sure. In that case, it makes a difference - and so you'd better decide 
which one you actually meant. But remember, Haskell's string concat 
operator is (++), not (+).


Post a reply to this message

From: Invisible
Subject: Re: This is the sort of brokenness...
Date: 24 Mar 2009 05:57:36
Message: <49c8ae90$1@news.povray.org>
nemesis wrote:
> I see you're back! :D

You can't see my back. It's invisible. ;-)

>> Why write
>>
>>   (define (addn n) (lambda (k) (+ n k)))
>>
>> when you can just say
>>
>>   addn n = (+n)
>>
>> ? ;-)
> 
> Because in plain Scheme you can't?

I know that. ;-) I'm just being a Haskell whore, as usual.

>> (This is one of the reasons why Haskell's ever-expanding set of 
>> features worries me. If people need all these extra features, doesn't 
>> that kind of indicate that the language is broken?)
> 
> If I'm not wrong, core Haskell is about as clean and simple as plain 
> Scheme, both based on lambda calculus.  Building upon solid, flexible 
> and simple infrastructure is not a bad idea.

Sure. But taking a solid, flexible and simple infrastructure and making 
it complex and convoluted isn't such a hot idea.


Post a reply to this message

From: Warp
Subject: Re: This is the sort of brokenness...
Date: 24 Mar 2009 09:57:25
Message: <49c8e6c5@news.povray.org>
Invisible <voi### [at] devnull> wrote:
> Sure. In that case, it makes a difference - and so you'd better decide 
> which one you actually meant. But remember, Haskell's string concat 
> operator is (++), not (+).

  Well, better example: If the operator is * and the elements are matrices.

-- 
                                                          - Warp


Post a reply to this message

From: Invisible
Subject: Re: This is the sort of brokenness...
Date: 24 Mar 2009 10:11:39
Message: <49c8ea1b$1@news.povray.org>
Warp wrote:
> Invisible <voi### [at] devnull> wrote:
>> Sure. In that case, it makes a difference - and so you'd better decide 
>> which one you actually meant. But remember, Haskell's string concat 
>> operator is (++), not (+).
> 
>   Well, better example: If the operator is * and the elements are matrices.

Yes. In that case, you'd better be really clear about which way you 
actually meant.


Post a reply to this message

From: Darren New
Subject: Re: This is the sort of brokenness...
Date: 24 Mar 2009 11:53:11
Message: <49c901e7$1@news.povray.org>
Invisible wrote:
> Sure. But taking a solid, flexible and simple infrastructure and making 
> it complex and convoluted isn't such a hot idea.

The secret is to have something in the infrastructure that lets you hide the 
convoluted complexity, whether that be LISP macros or Tcl upvar or C++ 
templates. Otherwise, you get Java.

-- 
   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: 24 Mar 2009 11:53:46
Message: <49c9020a$1@news.povray.org>
Invisible escreveu:
> nemesis wrote:
>> If I'm not wrong, core Haskell is about as clean and simple as plain 
>> Scheme, both based on lambda calculus.  Building upon solid, flexible 
>> and simple infrastructure is not a bad idea.
> 
> Sure. But taking a solid, flexible and simple infrastructure and making 
> it complex and convoluted isn't such a hot idea.

By simple of course we mean things that twist and bend the minds of 
common, mortal programmers.  We're just abstracting that a step further. ;)


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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