POV-Ray : Newsgroups : povray.off-topic : Teach yourself C++ in 21 days : Re: Teach yourself C++ in 21 strange malfunctions Server Time
29 Jul 2024 14:17:59 EDT (-0400)
  Re: Teach yourself C++ in 21 strange malfunctions  
From: Invisible
Date: 17 Apr 2012 11:25:31
Message: <4f8d8b6b$1@news.povray.org>
>> What, you mean like programs involving complex data manipulations?
>> Problems where you want to actually get the correct answer? Problems
>> where you'd like to be able to still understand the code in two years'
>> time? Because, to me, that sounds like a pretty /huge/ problem domain.
>> ;-)
>
> Give a specific example then, of a real commercial problem where
> selecting Haskell would be the best choice. I'm not saying none exist,
> just wondering exactly what type of software problem Haskell would excel
> at. Presumably it's not making a 3D game or an application that is
> mostly GUI.

> In the end companies that are trying to make money will just use
> whichever system lets them solve the problems as quickly as possible.
> This results in all manner of different languages being used (even
> Haskell!). But I think the reason you imagine C++/Java/C# being so
> popular is that the huge markets of software don't match with Haskell.
> Desktop software needs a familiar GUI and easy documented access to
> APIs. Apps for phones need good access to hardware (and usually the OS
> maker has chosen a language for you). Games need high performance and
> good access to hardware APIs.

I think /everybody/ wants to write code which is robust, reliable, 
portable and maintainable. The problem, as you say, is that usually 
getting access to the native resources is usually a highER priority than 
writing beautiful code.

If you release a Windows application which requires you to install GTK 
before it will work, nobody is going to care how beautiful the code is. 
(Except your dev team.) They're all going to think it looks like crap. 
And if you release an application written in low-level C and structured 
like spaghetti, nobody will care as long as it actually works reasonably 
well and it looks nice.

A guess fundamentally, if you write your application in C or C++, then 
you can use any code library that has ever been written, interface with 
any system, do absolutely anything you want. If you write your 
application in Haskell... then in theory you can do the same. In 
reality, it's going to take forever to write bindings to an external 
library, and because the binding is so low-level, you lose most if not 
all of the benefits of Haskell anyway.

If there ever comes a day when Haskell ships out of the door with 
top-quality libraries for doing most or all of the things that a typical 
developer would want to get done, then maybe Haskell will start to 
become popular. I don't see that day being particularly soon.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.