POV-Ray : Newsgroups : povray.off-topic : Tell me it isn't so! : Re: Tell me it isn't so! Server Time
10 Oct 2024 01:13:41 EDT (-0400)
  Re: Tell me it isn't so!  
From: Warp
Date: 28 Jul 2009 04:53:37
Message: <4a6ebc91@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> The problem with all the low-level languages like C and C++ and such is that 
> they don't really come with the libraries you need to do modern stuff. 
> There's nothing built in for threading, graphics, sound, IPC, etc. That's 
> all left to libraries developed well after the language was standardized.

  The reason why languages like C++ don't come up with libraries which would
be handy (such as graphics and sound) is complicated.

  There is no one single unambiguous, clear way of drawing graphics easily
and as efficiently as possible in all systems (never mind the fact that C++
is designed to be portable and not all computers even *support* any kind of
graphics). For example, if you were in Windows, how should a graphics library
work? Should it be a full GUI library like Qt or WxWidgets? Or should it be
simply a library which draws on some drawing surface/frame buffer, but leaving
GUI elements up to the (non-standard) system libraries? Should the graphics
be drawn using the Windows API, DirectX or maybe OpenGL? These are mutually
incompatible techniques which have their advantages and disadvantages, and
it's very difficult to create a library which would be agnostic to the choice
(and still be fully useful). Also if you wanted to draw accelerated 3D
graphics, there is no one single unambiguous, clear way of doing that either.
You could try to replicate OpenGL or something like DirectX, but since hardware
is constantly developing, the standard library would get old really quick.
It would be basically useless for anything new.

  Also such library would be highly non-portable. For example, if the C++
standard dictated some kind of GUI library, how would you implement it eg.
for the iPhone? You just can't. This would mean that for such systems you
would have to use a crippled version of the language which may or may not
compile some existing code.

  A standard library to play sounds would run into similar problems, as well
as its own. The source of the sound would be a difficult question. Usually
you would want to play a sound from a file. Which sound file formats should
be supported by a standard library? Many of the most useful formats have
license restrictions, which is something you really don't want to be using
in a programming language standard. Usually international standards for a
portable programming language try to be neutral with respect to proprietary
licensed file formats and such, for a good reason. Thus a standard sound
library would necessarily be very limited and mostly useless. It would also
probably get old quickly, as new, better formats are being developed all the
time.

-- 
                                                          - Warp


Post a reply to this message

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