Re: GoTo in Java




In article <1138044236.131727.197540@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, "Richard" <riplin@xxxxxxxxxxxx> writes:
> Michael Wojcik wrote:
>
> > > The popular languages are not so because of their syntax (eg see Perl),
> > > but because of the rich libraries and components that are available to
> > > implement the task with the minimum of source code.
>
> > That may well be one factor that contributes to some languages'
> > popularity, but C, for example, has been extremely successful despite
> > the fact that the standard library is very small and primitive. ...
>
> > ... It does mean, though, that
> > with a C implementation you get easy access to a huge array of software,
> > particularly tools, and that tends to draw people into C.
>
> So you do agree with me ;-)

Well, not exactly.

> There were many languages avilable that had adherents, but with C you
> could select from hundreds of diskettes of open source software to
> provide most of a solution.

There was (and is) a lot of C source available, true (see my response
to Howard on this topic). But I was actually referring to the fact
that with a C implementation you could build a lot of software that
was useful in itself, not as resources for your own C project.

In theory, there have long been many free libraries and code snippets
you could use to extend the standard C language in a more or less
portable fashion. In practice, though, for every C project I've seen
that uses, say, Berkeley DB to store data, I've seen ten that rely
directly on C's file I/O to implement their own (often not very well-
designed) database.

The history of C is a history of reinvention. Look at all the C APIs
available for providing GUIs under X11 (a key area for many applica-
tions which is not covered by the standard language), for example:
Xlib, Xtk, Xaw, Motif... And yet despite all of those, with their
often-overlapping functionality, we have many, many X11 C programs
that implement their own widget libraries. xrn, the newsreader I'm
using here, is one.

Contrast that with languages that have large standard or semi-standard
libraries, like Java or C++ (particularly since the 98 standard put
the STL in the standard library). libavl is readily available for
most C projects, but I see C programmers time and again implementing
their own tree structures. The competent contemporary C++ programmer,
on the other hand, will use a standard container for the vast majority
of applications.

There's a lot available for C, outside the standard language, but in
practice it does not see nearly as much use as similar facilities do
for other languages.

> > More importantly, OCaml is very safe; it's a strictly-typed functional
> > language with built-in memory management that's amenable to proofs of
> > correctness and secure programming techniques. Yet almost no one
> > uses it in commercial development.
>
> No, they seem to prefer loosely typed dynamic OO scripting languages
> such as Perl (yuk), PHP and Python (yay!).

That doesn't explain the popularity of, say, C++.

> > I could speculate why, but I think
> > really it comes down to a host of irrational factors: comfort level
> > and familiarity for developers and management; a reluctance to move
> > away from the languages used for existing code bases, even when those
> > are fraught with bugs; and chance - some languages catch the eyes of
> > tastemakers and others do not.
>
> And some have code or libraries available that do almost exactly what
> is required with minimum effort.

Some do, for some tasks. But again I've seen countless lines of C++
struggling to perform what could be done with far less effort - and
far fewer bugs - in OCaml. I don't believe richness of already-
available functionality is really very prominent in commercial
language selection. It plays a role, but I'm not convinced it's a
major one in the industry as a whole.

--
Michael Wojcik michael.wojcik@xxxxxxxxxxxxxx

But I still wouldn't count out the monkey - modern novelists being as
unpredictable as they are at times. -- Marilyn J. Miller
.



Relevant Pages

  • Re: Requesting advice how to clean up C code for validating string represents integer
    ... putting it up on your web site? ... Or you could complain to them yourself about the fact that people who do know the languages think that you do not. ... starting on two more c libraries. ... Do you think that a group that sometimes has members who are on the standard committee present, ...
    (comp.lang.c)
  • Re: ILC2005: McCarthy denounces Common Lisp, "Lisp", XML, and Rahul
    ... While these languages sure evolve slower than Perl/Python/Ruby/etc there is development. ... The C++ standard is revised and extended every 5 years or so. ... more libraries with a peer review system like boost.org. ... 2007 or 2008 (main changes are extended standards libraries: at least a collection classes library will be added). ...
    (comp.lang.lisp)
  • Re: Vista and .NET (Win32 life may be limted)
    ... just libraries), and doesn't represent "OS" functionality as such at all. ... .NET lives mostly on the server, ... libraries for different languages usually use ... Delphi's forte is Win32 client applications. ...
    (borland.public.delphi.non-technical)
  • Re: "STL from the Ground Up"
    ... wasted reinventing the wheel. ... plus thousands of third party libraries are all not enough to avoid ... C++ is very slow at dispatch compared to other languages. ... When you want to collect arbitrary data structures you either try to reuse ...
    (comp.programming)
  • Re: Extol virtues of Lisp, but then use Python?
    ... that prevents you or anyone else to build libraries of useful stuff. ... code (and not just yet another implementation of Scheme). ... COBOL, Fortran, Algol & Assembly languages. ... Python, C, Pascal etc. either. ...
    (comp.lang.scheme)