[Haskell-cafe] Can Haskell outperform C++?

Yves Parès yves.pares at gmail.com
Mon May 21 18:27:57 CEST 2012


> If you are writing a program or system that has significant performance
requirements, you might just be better off doing the whole thing in C/C++
and living with the annoyance of doing GUIs

I fail to see how the GUI part would suffer from lack of performance if the
rest of the system is fine. I would hate to be bold, but to me this case
sounds a little bit like "MVC done wrong" if the breaking GUI apart from
the rest of the software is really that impossible.
Anyway only benchmarks could tell if in such case the coding of the GUI in
Haskell and the integration with the rest burns the performances to the
ground.

> In addition, it's pretty much impossible for me to use Haskell to write
portions (or all of) a game that would include a console version. This is
largely for build system and platform support issues. Doing everything in
C++ is nearly the only option here.

I worked in a video game company too (I refered to it when I answered to
Ryan about companies automatically using C++), and I agree, the first
unbreakable obstacle to the implementation of some parts of the application
in Haskell (or in anything else than C/C++) that comes to mind is the fact
that in the end it must run not only on personal computers.
The main issue is that those systems are way too closed by their
manufacturers. Second issue may be RAM (way scarcer than on PCs: e.g. 512Mo
in all for the PS3), but --again-- benchmarks wrt that would be more
enlightening than my own opinion.

2012/5/21 Sam Martin <sam.martin at geomerics.com>

>
> > Yes, this seems to be a separate disease.  Not just using low-level
> langs, per se,
> > but using them for *everything*.  I have worked at places in industry
> where teams
> > automatically use C++ for everything.  For example, they use it for
> building all
> > complete GUI applications, which surprises me a little bit.  I would
> have thought
> > in recent years that almost everyone was using *something* else
> (Java,Python,
> > whatever) to do much of the performance-non-critical portions of their
> application logic.
>
> I think "disease" might be overstating this somewhat :) In defence of
> using C++ for everything: Interfacing different languages is not exactly
> trivial, and in some cases, impossible.
>
> If you are writing a program or system that has significant performance
> requirements, you might just be better off doing the whole thing in C/C++
> and living with the annoyance of doing GUIs, or whatever, in C++. The
> overhead of pulling in another language may simply outweigh the convenience.
>
> In addition, it's pretty much impossible for me to use Haskell to write
> portions (or all of) a game that would include a console version. This is
> largely for build system and platform support issues. Doing everything in
> C++ is nearly the only option here.
>
> This situation could be improved though, by making it far easier to embed
> Haskell within C/C++. It's not difficult by design, but there are large
> engineering obstacles in the way, and it's hard to see where the effort to
> remove these could come from. But then it would be more plausible to argue
> that people are missing out by not using a mix of C++ and Haskell.
>
> Cheers,
> Sam
>
>
> _______________________________________________
> 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/20120521/2e9c790f/attachment.htm>


More information about the Haskell-Cafe mailing list