[Haskell-cafe] Alternative name for return

Donn Cave donn at avvanta.com
Thu Aug 8 05:29:39 CEST 2013


quoth Richard A. O'Keefe

> Check the OED.  Most of its meaning are about _turning back_,
> _resuming_, _reverting_.  Yielding or making a profit is not at
> all about "providing a value", but about money going out AND
> COMING BACK.  It's the coming back part that makes it a "return".

Yes.  Return means 'go/come back';  used transitively, it means
'go/come back with _'.

> "value" occurs twice in OED 'return, v.1", in neither case
> referring to providing a value.

But of course, the word "value" as we use it is specific to our
application, i.e. it's computer jargon, with an English meaning
that's more like "thing", "object", "datum".  Wouldn't look for
"value" to convey this meaning in an OED definition of "return".

> In all of the senses, the underlying idea is not provision of a
> value, but going, turning, or bending back.

[Which is actually what the Haskell return fails to do.]

What goes/turns/bends back?  When used intransitively, the subject;
used transitively, the object, our "value."

I'll give you the COBOL example, it's no better the Haskell
return.  FORTRAN makes a good deal more sense for an English
speaker but uses indirect object semantically - RETURN 2
means return to the second alternate return specified by the
caller.  (I never used that feature, so don't take my word
for it, check your manual before using it!)

	Donn




More information about the Haskell-Cafe mailing list