Re: Discuss changing the behaviour of append()
- Posted by jimcbrown (admin) Jun 22, 2014
- 3362 views
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.
Well, no it doesn't - did I say it did?
Since you contradict yourself, it's very hard to determine what you are saying.
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.
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.)
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.