Re: Discuss changing the behaviour of append()

new topic     » goto parent     » topic index » view thread      » older message » newer message
gimlet said...

That because Euphoria's append is not a monoid that I expect all functions to be monoids?

1 Why should append be different?

So Jim, what are you saying, that I should not expect them to behave similarly?

Exactly. append and concatenation are two different things, two different functions. The same way that f(x) = x + 1 and g(x, y) = x + y are two different functions. They simply do different things and therefore do not behavior similarily.

gimlet said...

That I must expect a slow program because I asked for correct behaviour?

The fact that concatenation is slower (in the general case only) is irrelevant. Even if it were faster than append, the two functions still are two different functions. (Incidently, when concatenating an atom and a sequence, concatenation is implemented by calling either append or prepend (in the later case swapping the arguments), depending on the order of the arguments. So concatenation is not always slower.)

gimlet said...

And on the ground that many FUNCTIONS are not monoids you argue... what?

That append is not strange, as you originally posed:

gimlet said...

I'm not saying it's wrong but don't you find the difference strange?

gimlet said...

OK Jim,

And I suppose I have no recourse.

Bye.

I'd like to say good riddance, but I have a feeling that this wouldn't be the case: http://openeuphoria.org/forum/m/118296.wc http://openeuphoria.org/wiki/view/forum-msg-id-124160-edit.wc

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu