Re: Discuss changing the behaviour of append()
- Posted by jimcbrown (admin) Jun 22, 2014
- 3330 views
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.
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.)
And on the ground that many FUNCTIONS are not monoids you argue... what?
That append is not strange, as you originally posed:
I'm not saying it's wrong but don't you find the difference strange?
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