ENOSIG Discussie (threads)


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scheme vraagje: is (accumulate cons nil sequence) zinvol?


Lionel Elie Mamane writes:

>> I'm not familiar with caml like languages, could you explain what it
>> is you find irritating?
>
> Yeah, sure.

Sorry for replying so late: Thanks for your explanation!

> 1) (One of) the point(s) in using functional languages (for me) is
>    that one can pass around functional values just as "normal"
>    values.

Indeed.

>    Write higher-level functions, combinators, that abstract
>    powerful programming constructs and patterns and make them easy to
>    use, while typing few characters.

Hmm, interesting.

> 2) Brevity (taken reasonably) is a positive feature of a language.

Ok.

> Let's look at an example: let's suppose I want to increment every
> element of the list l. Without curryfication, I have to write
> something like
>
>   (map (lambda (x) (+ 1 x)) l)
>
> with curryfication, I would write:
>
>   (map (+ 1) l)

Yes, I see; that would be nice.

> which is much shorter and much more readable. Here you see that
> actually, curryfication conflicts with a feature of Lispy languages:
> variable number of arguments.

Aha, indeed.  That's unfortunate, because variable number of arguments
is quite a feature too?

Don't you miss that at all?

> Am I making sense now?

Quite.

Greetings,
Jan.


Follow-ups:

Gerelateerd:


[ Date Index] [ Thread Index]