🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.functional
Article #641

Why curry? (Re: Why functional languages?)

#641
From: Thomas M. Breuel
Date: Sun, 04 Oct 1992 22:18
27 lines
1789 bytes
      datatype foo = FOO of x
      fun bar FOO x = x

	     (     )
   Missing parens, of course; you didn't really want a curried function
   of type (x -> foo) -> 'a -> 'a, did you? What's the problem? Anyone
   who's done much work in SML should recognise immediately that

	   fun bar x y = 

   defines a curried function.

Why _do_ people continue to use curried syntax when they just want a
function with several arguments? It's difficult to optimize for the
compiler, it gives uninformative type signatures (is "'a -> 'a -> 'a"
intended to be a function of one argument returning a function, or is
it intended to be a function of two arguments returning a "'a"?), it's
not what most programmers are used to, and it seems to be difficult to
indent automatically as well.

When I started using SML, I found curried syntax "cute" for, but after
a few months, I began to find it rather bothersome, and now, I have
completely switched over to tupled syntax (including my own "standard"
library).

					Thomas.
Technical Details
Message-ID: <TMB.92Oct4181821@arolla.idiap.ch>
Path: arc1-ca.pugleaf.net!sparky!uunet!know!hri.com!spool.mu.edu!uwm.edu!rpi!think.com!mintaka.lcs.mit.edu!ai-lab!life.ai.mit.edu!tmb
References: <TMB.92Sep28144424@arolla.idiap.ch> <annius.717696151@freyr> <TMB.92Sep28223555@arolla.idiap.ch> <26463@castle.ed.ac.uk> <BvGz2u.2rv.1@cs.cmu.edu> <NICKH.92Oct2134230@VOILA.VENARI.CS.CMU.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!know!hri.com!spool.mu.edu!uwm.edu!rpi!think.com!mintaka.lcs.mit.edu!ai-lab!life.ai.mit.edu!tmb
From: tmb@arolla.idiap.ch (Thomas M. Breuel)
Newsgroups: comp.lang.functional
Subject: Why curry? (Re: Why functional languages?)
Message-ID: <TMB.92Oct4181821@arolla.idiap.ch>
Date: 4 Oct 92 22:18:21 GMT
References: <TMB.92Sep28144424@arolla.idiap.ch> <annius.717696151@freyr>
 <TMB.92Sep28223555@arolla.idiap.ch> <26463@castle.ed.ac.uk>
 <BvGz2u.2rv.1@cs.cmu.edu> <NICKH.92Oct2134230@VOILA.VENARI.CS.CMU.EDU>
Sender: news@ai.mit.edu
Reply-To: tmb@idiap.ch
Organization: IDIAP (Institut Dalle Molle d'Intelligence Artificielle
 Perceptive)
Lines: 27
In-reply-to: nickh@CS.CMU.EDU's message of 2 Oct 92 18:42:30 GMT