Actually the languages that don't, aren't worth using in production environments, this isn't anything C special.
Actually the languages that don't, aren't worth using in production environments, this isn't anything C special.
The Haskell community is silent on getting rid of lazy-ness from it or at least making it completely and entirely optional for people. So let me repeat this even if Haskell is good to train your mind in the comfort of your home, it is miles far from being enterprise ready.
[1] http://anil.recoil.org/papers/2011-cufp-scribe-preprint.pdf
Yeah, but that's because it targets a pre-existing strict runtime, not because of any problems with laziness.
The rationale behind their decision is simple: Laziness comes with its big problems, one of them is difficult to debug and predict runtime behavior.
Mu is strict because it was designed to target an existing strict runtime for which plenty of code was already written (in a language called Lambda, the letter before Mu in the Greek alphabet) and which was already deployed to many users through the corporation. The decision to be strict and not lazy has nothing to do with any downsides of laziness.
For people without an argument. Because then you would have to know what those firms actually do.
Read this: http://flyingfrogblog.blogspot.de/2010/05/why-is-haskell-use...
It's from 2010 so things may be different - but it illustrates that you can't just drop names, you have to do your research.
I at least bothered to provide a list of enterprises that bother to make use of Haskell, regardless how much of it they end up writing.
Anyone can easily search for videos of online talks where people describe their experiences in the finance industry with data modeling in Haskell.
Also if it would be so bad, the number of Haskell jobs outside academia wouldn't be increasing.
Sure, but you have to do your research too, into what kind of person Jon Harrop is and about how seriously you should take his critiques of Haskell.
PS. And, again, even if such tools existed they were just for informational purposes since you don't have much control over the generated code so you cannot sensibly modify source to change the binary in expected way. For example, in C, if I see a high number of cache misses in some loop I can: a) change the data layout (e.g. align structure fields or move simultaneously accessed fields together) b) add a prefetch. What am I to do in Haskell?
You can also do layout changes in Haskell, for example use a ByteString instead of Text, or an Array instead of Lists and so on.
What you mean by doing prefetchin C? There isn't any ANSI C feature for that. Only compiler tricks and hope for the best.
And I am saying you cannot.
>What you mean by doing prefetchin C? There isn't any ANSI C feature for that.
Actually, there is, it's called inline assembly. But any decent compiler has an intrinsic anyways.
>You can also do layout changes in Haskell, for example use a ByteString instead of Text, or an Array instead of Lists and so on.
So, I have this type data Vector3 = Vector3 Float Float Float. Can I change its layout without having to change the rest of the code? The only way I know is compiler-specific unboxing and even that has little predictable effect, as we don't even know if this type is going to hold boxed values to begin with.
Which is a language extension and not a C feature.
Nothing prevents an Haskell compiler to provide similar extensions.
> So, I have this type data Vector3 = Vector3 Float Float Float. Can I change its layout without having to change the rest of the code? The only way I know is compiler-specific unboxing and even that has little predictable effect, as we don't even know if this type is going to hold boxed values to begin with.
Yeah, with my limited Haskell knowledge I would say you would need to make use of Data.Vector.Unboxed or use unboxed values as compiler extension like on JHC.
Still, there are ways to improve performance on Haskell applications, even if they require new ways of thinking.
Back in the day higher level languages (including C) were quite bad at generating code on home computers, and we had to use Assembly if we cared about performance.
So like C compiler quality and tooling has improved in these last decades due to high industry use, Haskell tools can also improve if its acceptance in the industry keeps increasing.
And then we can probably enjoy such tools for Haskell as well.
In line assembler has always been C feature. I also fail to see the point of mentioning intrinsics being extension. Do you have an example of a compiler, which does not support cache prefetch on a platform that supports them?
>I would say you would need to make use of Data.Vector.Unboxed
I believe you are missing my point. The run-time layout of this type is not known in the first place. Making it unboxed may or may not change its layout to another unknown one. If you need a specific change, and not a change for the sake of change - there is nothing you can do. In C, I might want this to be a 12 byte type if I access the values sequentially and a 16 byte if randomly. In Haskell you can either have it boxed (and you have an order of magnitude more cache misses) or have either 12 or 16 byte in unboxed, but you cannot tell which one and if you wanted another one - tough cookies.
>Haskell tools can also improve if its acceptance in the industry keeps increasing.
And if they do we will discuss them then.