[Haskell-cafe] Re: Trying to write 'safeFromInteger'
ben.franksen at online.de
Wed Apr 8 17:26:24 EDT 2009
Jason Dagit wrote:
> On Wed, Apr 8, 2009 at 9:26 AM, david48 <dav.vire+haskell at gmail.com>
>> On Wed, Apr 8, 2009 at 2:55 PM, Neil Mitchell <ndmitchell at gmail.com>
>>> That seems a really weird way to write it! Who decided all auxiliary
>>> functions should be called go? (I think I'm blaming dons) - why not:
>>> sffi :: (Integral a,Num a) => Integer -> Maybe a
>>> sffi n | toInteger n2 == n = Just n2
>>> | otherwise = Nothing
>>> where n2 = fromInteger n
>> I know I was too lazy to clean it up :-P
>> ( I also blame Dons for 'go' )
> I think the Common Lisp community tends to use 'foo-aux' instead of
> 'go' for these sort of axillary functions. But, then in Haskell we
> can't use hyphen as an identify character and underscore is not
> popular. For this reason I started using fooAux in Haskell, but after
> learning that a single quote is valid identifier character I started
> using foo'.
> Other than using go and foo', what do people use in Haskell?
You could combine Lisp and Haskell and say foo'aux :-)
More information about the Haskell-Cafe