|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
>>> 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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |