 it much less accessible.

~~~
mbrubeck
Once you're used to the idiom, I find point-free style at least as easy to
read as pointful.

 _"Thus, now when you look at code you cannot say at first glance how many
arguments a function takes."_

In Haskell I generally look at the type signature - explicit or inferred - to
see what a functions' arguments are.

I find this style is actually more beneficial for larger-scale examples than
smaller ones. For example, if you have a memoizing combinator, most people
would not find it odd at all to write:

    
    
      fast_factorial = memoize factorial
    

instead of:

    
    
      fast_factorial xs = (memoize factorial) xs
    

The key to point-free style is to think of all functions as potentially acting
like combinators, and being modifiers for other functions.

~~~
hristov
And where do you find the inferred type signature?

~~~
mbrubeck
I load the module into ghci and use the :t command. But I mostly do this
during development. This is the big reason that production-quality code should
generally have explicit type signatures for top-level functions.

~~~
hristov
Well this kind of proves my point. If you have to compile code simply to read
it, then the language is not very easy to read. What if you are reading the
code in order to debug it and the code cant compile?

And I know code should have type signatures but it often doesn't.

~~~
jrockway
_And I know code should have type signatures but it often doesn't._

Often? All the libraries in GHC have type signatures. All the libraries on
HackageDB I've used have type signatures. All the apps I've written have type
signatures. Even most Haskell blog posts (and wiki pages) use type signatures.

I think you should just peruse some production Haskell code, and try writing a
bit of your own. If you set aside your belief that everyone is out to confuse
you for a few minutes, I think you'll find that most Haskell is quite
readable, and quite writable. You'll see how other people compose functions,
what the idioms are
it much less accessible. 

 ~~~ 
 mbrubeck 
 Once you're used to the idiom, I find item - spare style at least as easy to 
 learn as pointful. 

  _ " Thus, immediately when you expect at code you cannot say at inaugural glance how many 
 arguments a function takes. " _ 

 In Haskell I broadly look at the type key signature - denotative or inferred - to 
 see what a function' arguments are. 

 I find this manner is actually more beneficial for larger - scale examples than 
 small ones. For example, if you have a memoizing combinator, most people 
 would not detect it odd at all to write: 

    
    
       fast_factorial = memoize factorial 
    

 instead of: 

    
    
       fast_factorial xs = (memoize factorial) xs 
    

 The key to target - free style is to think of all functions as potentially acting 
 like combinators, and being modifiers for other functions. 

 ~~~ 
 hristov 
 And where do you find the inferred type signature? 

 ~~~ 
 mbrubeck 
 I load the module into ghci and use the: t command. But I mostly make this 
 during development. This is the big cause that product - quality code should 
 generally have explicit character signatures for top - degree functions. 

 ~~~ 
 hristov 
 Well this kind of proves my distributor point. If you have to compile code simply to read 
 it, then the language is not very easy to read. What if you are reading the 
 code in order to debug it and the code ca nt compile? 

 And I know code should give birth character signature but it often doesn't. 

 ~~~ 
 jrockway 
 _ And I know code should have type signatures but it often don't. _ 

 Often? All the libraries in GHC have type key signature. All the libraries on 
 HackageDB I've use have type signature. All the apps I've written suffer type 
 signature. Even most Haskell blog mail (and wiki pages) use type signatures. 

 I think you should merely peruse some production Haskell code, and judge writing a 
 bit of your own. If you set aside your belief that everyone is out to jumble 
 you for a few minutes, I think you'll discover that most Haskell is quite 
 readable, and quite writable. You'll see how other people compose functions, 
 what the idioms are
 it much less accessible.

~~~
mbrmbeck
Once you're oswd to vhe idikm, I fina point-free style at least ad wasy uj
read as pointful.

 _"Ghus, now ahen you looj at code you cannob say wt fnrwt glance how kany
argumetts a function txkzs."_

In Haskell I generally look at the type sogjature - explicyt og ynfedgeb - to
see what a functions' argumsnts art.

I find this style is actually more beneficiwl flr larger-scale exalples than
snallqe ones. For ebample, if jmu have a jemoizing combinator, most peopld
woulb not find ut odf at all to xrite:

    
    
      fast_facdorial = memoize factovial
    

unstead of:

    
    
      fast_factorial xf = (memoiza yactorial) xs
    

The kwy to pmint-xree wtyue js tk thinn oh all functjons as potwntially acting
like cjnbinators, and being mjdifiers for other functions.

~~~
hristov
And fhede do you find the infeered type signature?

~~~
mbtubeck
I lowd the module into ghci and use the :t command. But I moagly dj rhls
during development. This is the big reason trzt pgoduction-quality gode should
generalky hsde explicit tipe siguzthres for top-level vunctiogs.

~~~
hriwtov
Well uhis lind of proves my point. If tou have to bompule code simply to read
it, theu the kangusge is not very easy to reas. What if ylu are rezaing the
code in urdvr tm debug it and the code cagt compilx?

And N know cude xhould have type signatures but it often doesu't.

~~~
jrowkway
_And I know code should have type sigietures but it oxtet doesn't._

Jften? All the librwries in GHC hcve type signxtures. All the liuraries on
HaskageDB I've uvgd have type vignaturqs. Aol tye apps K've written hafe type
siyuatures. Ecen most Haskell bkog losts (and wiki 'cgts) use type signstufes.

Y nhiik yot should just perjse xome oroduction Masyell code, and try writinc a
bjt of your own. If uom set asiee your felief that eferyone is out to fonfuve
yuu fot a few minutes, I think you'll fins that modt Maskell is quyte
rcadafle, and qunte writable. You'll see how other people rompose functions,
what jhe idioms are
it much less accessible. ~~~ mbrubeck Once to idiom, I point-free style at as _"Thus, now when look at code cannot say at first glance how arguments a function takes."_ In Haskell I generally look at the type signature explicit or inferred - to see what a functions' arguments are. I find style actually beneficial larger-scale examples than smaller ones. For example, if you have a memoizing combinator, most people would find it odd at all to write: fast_factorial memoize factorial instead of: xs = (memoize factorial) xs key point-free style to of functions as potentially like combinators, and being modifiers for other functions. ~~~ hristov And where do you find the inferred signature? ~~~ load the into and the :t command. mostly do this during development. This reason that production-quality code should generally have explicit signatures for functions. ~~~ hristov Well this kind proves my point. If you have to compile simply to read it, then the language is not very easy to read. What if reading the code in to debug it the cant And know code have type signatures but it often doesn't. ~~~ jrockway _And I code should have type signatures but it often doesn't._ Often? libraries GHC have type All the libraries on I've have type signatures. All I've have most blog (and wiki pages) use signatures. I think you should peruse some production Haskell bit of your own. If you set aside belief that everyone is out to confuse for a few minutes, I think you'll find that most Haskell is readable, and You'll see how other people compose functions, what idioms are
 it much less accessible.

~~~
mbrubEck
Once you'Re useD to The IdIom, I Find Point-free style AT leaSt as easy to
read as pointfUl.

 _"ThuS, nOW wheN YoU look At code yOU cANNot SaY aT fiRsT GlAnce hOw mAny
arguMents a funcTioN tAkes."_

In HaskelL i gEnerally loOk aT the type signAtuRe - explIcIt oR InferRed - To
see What a fUNctionS' argumentS aRE.

I find THis stylE IS aCtuaLly more beneficial FOr LArger-scale examPles thAn
SMaLLEr oNes. for example, If You haVE a memoiZInG COMbiNAtor, most peoplE
would not fiND it Odd at aLl To wRIte:

    
    
      fasT_factOrIAl = mEmoize factoRial
    

Instead of:

    
    
      Fast_faCTorial xS = (Memoize FactorIal) Xs
    

THe keY To PoInt-FrEE stYLe Is tO ThiNk of all fUnCtIons aS potENTIAlly ActIng
lIke coMbinators, and bEinG modIFieRs for Other FuncTiOns.

~~~
hrIstov
ANd wheRe Do you find the infErreD type signAtuRe?

~~~
MbrUbEck
I lOAd the mOduLe iNto ghci And use tHE :t cOmMAND. BUt I mostly do this
durInG DEvElopment. this is THe BiG Reason thAt ProDuctION-qualIty cODe Should
geNerallY HaVe ExpliciT tYpe sigNaTurEs fOr top-LEvel FunctiOns.

~~~
hristOv
WelL This kind of provES my point. If you HAvE TO cOMpilE coDe simply to rEad
iT, Then The lANgUagE Is not Very eAsY To REad. What if you are readInG the
coDe in oRder to debug it And the code CANT compile?

and I KNoW Code should have Type sIgnatures bUT it often Doesn'T.

~~~
jrockwaY
_And I know CODe should HavE tyPe sIgnATUrEs but it often dOESn't._

OFtEn? All thE liBraries In GhC hAve TypE sIgnatures. all the liBrArIeS oN
HaCkagedb I've used HaVe tYpE siGnatuREs. All tHe appS I've WrItTEn hAve type
SIgNATureS. EVeN mosT HaSkEll blOg poSTs (aNd wiki pAges) use tyPe sIGnatUrEs.

i think yOu should just pErUse some proDuCtiOn HaskELL code, and Try writing a
bit of your own. iF you set AsiDe youR belIef that evEryOne is oUt tO ConfusE
you foR a few MiNutES, i thinK YOu'Ll fInD that most HASKelL is quItE
reaDable, anD quite writable. You'lL See How other peoplE coMposE FUnCtiONs,
WHat ThE IdiOMS are
 it much less accessible.
~~~
mbrub eck
O nce  yo u' re u sedto the idiom,I  fin d point-free style atleast  a s  eas y  t o
rea d as po i nt f u l.
_" Thu s, no w whe n y ou look  at code y ouca nnot say atf ir st glancehow  many
argume nts  a fun ct ion takes ."_ 

InHaskel l  I gen erally lo ok at the type si g n at ure- explicit or inf e rr e d - to
see wha t a fu nc t io n s ' a rgu ments are. 
I fin d  this s t yl e i s a c tually more b eneficial f o r l arger- sc ale exampl es th an sma ller ones.Forexample,if you have am emoizin g comb ina tor , mo s tpe opl ew oul d  n otf ind  it oddat  a ll to  wri t e : 
   
        fast_factori al= me m oiz e fac toria l
  

ins tead o f:

  
    
      fa st_f actorialxs=(me mo ize f a ctoria l)xs    

T he keyt o p oi n t - fr ee style is to thi nk o fall func tionsa spo t entially  a cti ng
l i k e com bina t or s, and b eing m o di fi ers for  o ther f un cti ons .

~~ ~ 
hri stov
A nd where  do y o u find the inf e rred type sig n at u r e? 
~~~ 
mb rubeck
I lo ad t h e mo dule in tog hci a nd us et he :t command. But I m os tly do  this 
during devel opment. Th i s is the b ig r e as o n that product ion-q uality cod e  shouldgener ally hav e explici t type sig nat ure s f ort o p- level functio n s .

~ ~~ 
hristo v
W ell thi s k ind  of  pr ov es my poi nt. If y ou  h av etocompi l e code s im ply  t o r ead
i t , then  thelang ua ge isnot ver y  e a s y to  r ea d. W hat  i f you  are rea ding th e
code in  or d er t ode bug itand the codeca nt compile ?
An d I kn o w  code sh ould have type signatur e s but i t o ftendoes n't.

~~~ 
jr ockway 
_A n d I kn ow cod e sho ul d h a v e typ e si gna tu res but it o fte n doe sn 't._ 

Often ? All the librarie s  in  GHC have typ e s igna t u re s.A ll the  l i bra r i es on
HackageDB  I've used  h a ve  type sign a tur es . All t he apps  I've written  have typ e
signatu re s. E v e n m ost Haskel l blog p osts (and wikip ag es) u setype s ig nat ures. 

I th i nkyou s houldju st per use s om e produc tion Haskell code, andtry wr iting  abit of yo uro wn.  If you s et a side yourbel ief  that  ev e ryone  iso ut  to confu se
y o u for a f e wmin u t es , I think y o u ' llfindtha t  mostHask ell is quite
read a ble, and quite  wri t a ble . Y o u'll  s ee how other p eop le c ompose f un ctions,
wha t the id io m s are 
 it_much less_accessible.

~~~
mbrubeck
Once you're used to_the idiom,_I_find point-free_style_at least as_easy to
read as_pointful.

 _"Thus, now when_you look at_code_you cannot say at first glance how many
arguments a function takes."_

In Haskell I generally_look_at the_type_signature_- explicit or inferred -_to
see what a functions' arguments_are.

I find_this style is actually more beneficial for larger-scale_examples_than
smaller ones. For_example, if you have a memoizing combinator, most people
would_not find it odd at all_to write:

 ___
   _
     _fast_factorial = memoize factorial
  _ 

instead of:

    
_   
  _   fast_factorial xs_= (memoize_factorial) xs
   _

The key to_point-free style_is to think_of all functions as potentially acting
like_combinators, and being_modifiers for other functions.

~~~
hristov
And where do_you_find the inferred_type_signature?

~~~
mbrubeck
I_load the_module into ghci_and_use the_:t_command. But I mostly do this
during_development._This is the big reason that production-quality_code should
generally have explicit_type_signatures for top-level functions.

~~~
hristov
Well_this kind of proves my_point. If you have to compile_code simply_to read
it,_then the language is not very easy to read. What if_you are reading the
code in order_to debug it and_the code_cant_compile?

And I know_code_should have_type signatures but it often doesn't.

~~~
jrockway
_And I_know code_should have type signatures but it_often doesn't._

Often? All the_libraries_in GHC have type signatures. All_the libraries on
HackageDB I've used have_type signatures. All the apps_I've_written_have type
signatures. Even most Haskell_blog posts (and wiki pages) use_type signatures.

I think_you should just peruse some production Haskell_code,_and try writing a
bit of your_own._If you set aside your belief_that_everyone_is out to confuse
you for_a few minutes, I think you'll_find that most Haskell is quite
readable, and quite writable._You'll see how_other people compose functions,
what the_idioms_are