ch-ch-changes

Yigal Chripun yigal100 at gmail.com
Wed Jan 28 12:31:04 PST 2009


Bill Baxter wrote:
> On Wed, Jan 28, 2009 at 6:07 PM, Nick Sabalausky<a at a.a>  wrote:
>
>> Isn't "tail" the standard counterpart to "head"? ("toe" just doesn't sound
>> good)
>
> Tail has a history of being used to mean "everything but head" in
> functional programming languages like Haskel and ML.
>
> So of  back, last, end, tail, rear, foot, toe, it seems every one has
> some strike against it.
>
> back - could be mistaken for an action
> last - doesn't pair well with "head", and "first" sounds too much like
> item #1 overall
> end - in C++ usually means "one past the end"
> tail - in FP langs means "everything but head"
> rear - makes Walter thing unhappy thoughts
> toe - sounds silly, doesn't make so much sense for a range that
> represents a tree structure.
>
> Toe is sounding pretty ok.
>
> Actually I think the critique that it doesn't make sense for a
> non-linear range should be thrown out.  Linearizing is the whole
> purpose of a range.  So even if it wasn't linear before, a range
> effective is providing a linearized view of it.
>
> So that leaves "it sounds silly", which is a pretty weak subjective
> argument against.
>
> --bb

I disagree with the above reasoning. "Language X has different meaning 
for word Y" is not a valid argument IMO. One of D's stated goals is to 
break backward compatability when needed in order to get a better 
language design, yet we constantly keep getting back to " but in C++ ...".
if people want to use a backward compatible language they already have 
C++ for that, and they don't need D. I for one, prefer to change when 
the change makes sense and brings more clarity. Yes, it'll be initially 
confusing for former C++ programmers, but IMO it's worth it in the long 
run.
head/toe is not just silly, it's also non intuitive for non-English 
speakers. (I'd be confused by this, had i seen this for the first time)
When I write D code I think in D, not any other language and I'm sure 
that applies to most people. making the switch to "D mode" is easier IMO 
than trying to remember confusing terms, just because some other 
language has slightly different meaning for the deafult terms.

Hack, I don't even know haskel, why should I care about haskell's 
definitions?

I already asked in a previous post - would a chinese programmer 
intuitivly think that toe is the last item in a range?



More information about the Digitalmars-d mailing list