Re: Discuss changing the behaviour of append()
- Posted by gimlet Jun 22, 2014
- 4005 views
[quote jb] gimlet said...
So, Jim,
Associativity doesn't require identity? Is that what you are saying?
I didn't say that - but it's true: http://en.wikipedia.org/wiki/Semigroup
Haskell has a list concatenation operator that has both of these properties, as does Euphoria's own concatenation operator. Euphoria's append has neither. I don't find this state of affairs particularly strange - concatenation naturally has these properties, but the function we define as append (which can be simulated by concatenation) does not. gimlet said...
Well, no it doesn't - did I say it did?
Since you contradict yourself, it's very hard to determine what you are saying. gimlet said...
But "Hello World!" & "" = "Hello World!" or didn't you notice?
You keep comparing append to concatenation. If you are trying to state that append should behavior identically to concatenation, please state so explicitly, not in this roundabout way.
If you disagree that append should behavior identically to concatenation, I'd like to see some examples where you believe they ought to behave differently. gimlet said...
If A append B is not a monoid then|| (OK: you have your own (rather (beautiful??) operator))
Hardly. Appending is basic operation involving any kind of list structure. I can't think of a single programming language that lacks a function or method to implement this functionality. (Maybe Haskell.) gimlet said...
But what have you proved to the world?
I think Jim, that what you have proved is that (mostly, you are talking BS).
This is implicitly an ad hominen argument and can be dismissed as such.
I'll restart my original argument for clarity: Since there are many mathematical functions which lack both the associativity and identity properties, I do not find it at all strange that Euphoria's append routine lacks these properties as well.
I didn't say that - but it's true: http://en.wikipedia.org/wiki/Semigroup
So Jim,
I contradict myself.
But "Hello World!" & "" = "Hello World!" or didn't you notice?
You keep comparing append to concatenation. If you are trying to state that append should behavior identically to concatenation, please state so explicitly, not in this roundabout way.
Jim, you are so sure!
1 Why should append be different? Append is supposed to be fast and (&) slow. So Jim, what are you saying, that I should not expect them to behave similarly? That I must expect a slow program because I asked for correct behaviour?
That because Euphoria's append is not a monoid that I expect all functions to be monoids?
And on the ground that many FUNCTIONS are not monoids you argue... what?
Jim, I am rather of the opinion that you don't know what you are talking about.
So how much maths did you do? To what purpose?

