[Haskell-cafe] strict version of Haskell - does it exist?

Don Stewart dons00 at gmail.com
Sun Jan 29 22:55:08 CET 2012


Generally strict Haskell means using strict data types - vectors, arrays,
bytestrings, intmaps where required.

However, you usually don't want all code and data strict, all the time,
since laziness/on-demand eval is critical for deferring non-essential work.

Summary; -fstrict wouldn't magically make your code good. Using the right
balance of strict and lazy code, via the right choice of strict and lazy
types, however, often does.

Id be interested to know what choices were made in your log file case led
you into problems -- using something excessively lazy (like lazy lists) or
something excessively strict (like strict bytestrings) would both be
suboptimal for log analysis. A hybrid type like a lazy bytestring, would be
more appropriate.

On Sunday, January 29, 2012, Marc Weber <marco-oweber at gmx.de> wrote:
> A lot of work has been gone into GHC and its libraries.
> However for some use cases C is still preferred, for obvious speed
> reasons - because optimizing an Haskell application can take much time.
>
> Is there any document describing why there is no ghc --strict flag
> making all code strict by default?
> Wouldn't this make it easier to apply Haskell to some additional fields
> such as video processing etc?
>
> Wouldn't such a '--strict' flag turn Haskell/GHC into a better C/gcc
> compiler?
>
> Projects like this: https://github.com/thoughtpolice/strict-ghc-plugin
> show that the idea is not new.
>
> Eg some time ago I had to do some logfile analysis. I ended doing it in
> PHP because optimizing the Haskell code took too much time.
>
> Marc Weber
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120130/c5ff6e44/attachment.htm>


More information about the Haskell-Cafe mailing list