On Mar 12, 2010, at 06:01 , Johannes Waldmann wrote:
in this case, something like: Data.List.Strict.fold,
Data.List.Lazy.fold
Or - if we had static overloading, and strictness info in the type,
then we wouldn't need different names. Can of worms ...
Doesn't help if strictness needs to be c
David Virebayre gmail.com> writes:
> But then if you need both version, you will have to import them
> qualified, which I don't like much.
solution: type directed name resolution:
* either in the language,
http://hackage.haskell.org/trac/haskell-prime/wiki/TypeDirectedNameResolution
* or, fa
On Fri, Mar 12, 2010 at 12:01 PM, Johannes Waldmann
wrote:
> David Virebayre gmail.com> writes:
> in this case, something like: Data.List.Strict.fold, Data.List.Lazy.fold
But then if you need both version, you will have to import them
qualified, which I don't like much.
__
Am Freitag 12 März 2010 12:14:06 schrieb Paul R:
> wren> I wish Haskell allowed ! to occur (non-initially) in alphanum_'
> wren> identifiers as well as in symbolic ones. Then we could be more
> wren> consistent about having ! mean strictness
>
> BTW, does something in haskell syntax prevent '?' fro
wren> I wish Haskell allowed ! to occur (non-initially) in alphanum_'
wren> identifiers as well as in symbolic ones. Then we could be more
wren> consistent about having ! mean strictness
BTW, does something in haskell syntax prevent '?' from appearing at the
end of identifiers ? It is a nice way
David Virebayre gmail.com> writes:
> Even if we had a syntax to express that the function is strict,
> wouldn't we still need two distinct function names for the strict and
> lazy case ?
OK, I'd like to register a "code smell" for:
"hierarchical/systematic structure inside identifier names";
su
On Fri, Mar 12, 2010 at 10:29 AM, Johannes Waldmann
wrote:
> Well, meaningful identifier names is nice, but I think
> here we have a case of the code smell "type info embedded in the name".
> Strictness of a function should be expressed in the function's type instead.
> But that seems impossible
> > Note that foldl' has a ' to indicate that it's not the same as foldl
> > exactly. I would propose that sum' exist as well as sum, and that sum be
> > lazy.
Well, meaningful identifier names is nice, but I think
here we have a case of the code smell "type info embedded in the name".
Strictnes