Re: GoTo in Java




In article <1138214181.319054.287150@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, "Richard" <riplin@xxxxxxxxxxxx> writes:
> > Xlib, Xtk, Xaw, Motif...
>
> > Contrast that with languages that have large standard or semi-standard
> > libraries, like Java or C++
>
> C++ can use dozens of GUI API: wxWidgets, Qt, GTK, FLTK, FOX, Allegro,
> ...

Yes, but I'm afraid I don't see the relevance of that to my point. I
mentioned the proliferation of X11 APIs for C only as an example of
the proliferation of reinvention. When I invoked the C++ standard
library in the next paragraph I was referring to its breadth in
general; obviously it doesn't include an X11 API, or indeed any GUI
API.

> Java has AWT, Swing, SWT, wx4j (wxWidgets), BambooKit, Zaval

Swing was invented by Sun as a successor to AWT. wx4j is a port of a
preexisting API to Java. BambooKit isn't an API; it's an XML-based
GUI scripting language. None of them represent reinvention as such.

Zaval is something of a competitor to Swing, though even here there
are some distinct differences in design goals.

At any rate, the reimplementation of data structures in one C program
after another is a better example. C doesn't include any serious
container mechanisms in the standard language, and the availablilty
of free, open-source implementations hasn't dissuaded C programmers
from reinventing them time and again.

> > That doesn't explain the popularity of, say, C++.
>
> C++ is attractive to C programmers because they can continue writing in
> C and using C libraries and existing code and just bolt-on the ++ bits
> if there is an advantage.

No doubt some do, but many C++ developers - the good ones, IMO -
treat it as it should be treated, that is as a language that is quite
different from C, with its own capabilities and idioms.

At any rate, my comment above was a response specifically to your
claim that "they seem to prefer loosely typed dynamic OO scripting
languages", which would clearly not include C++.

My point throughout this discussion is that I don't believe there's a
single simple explanation, or even a small set of not overly complex
explanations, for programming language preference. I don't think
"rich libraries" is it. I don't think "dynamic OO scripting
languages" is it. I suspect that for any single reasonable criterion
we can find a counterexample.

> > 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 think that OCaml is in any way unique in that respect.

Nor do I, though I do think it's in the minority. But it was only
an example.

> Perl is
> renowned for its extreme conciseness, to the point of being cryptic,
> Ruby, PHP, ECMAscript (Javascript), Python, can all do stuff in a
> handfull of lines that may be pages of C++, Java or Cobol. With Python
> it will still be readable.

Of those, only Ruby and Python even approach OCaml's expressiveness.
And I wouldn't equate concision with reduced effort (which is the
metric I cited), nor with reduced error. APL is often very concise,
but rarely easy; command-shell scripts are often short and often
badly broken.

--
Michael Wojcik michael.wojcik@xxxxxxxxxxxxxx

Painful lark, labouring to rise!
The solemn mallet says:
In the grave's slot
he lies. We rot. -- Basil Bunting
.



Relevant Pages

  • Re: (Prolog + LISP + Erlang) with integration issues versus C++
    ... >> they will write idiomatic lisp so soon after learning it. ... >> Learning the language on the job is not a recipe for good maintainance. ... > programmers. ... standard, but it's been extended so heavily it may as well not be. ...
    (comp.lang.lisp)
  • Re: global variables are bad?
    ... letter limit, I cannot really claim that I am convinced. ... language was in all cases, bar one, in English. ... Some of the programmers wanted to ... A few code reviews, standard ...
    (comp.lang.c)
  • Re: CRT and Win32 SDK
    ... However, it might give a reader an impression that when doing embedded programming one typically has a full-fledged language at hand, where in effect the runtime library implements what the OS would provide on e.g. a PC. ... The C and C++ standards differentiate between hosted and free-standing implementation to deal with the special constraints of embedded programming, where free-standing doesn't need to provide all of the language's standard library, but even that distinction does in practice not go far enough: it might be that fundamental language features such as static variables and exceptions are not available on the embedded platform's language implementation. ... Both the user-mode Win32 API and the kernel ... The documentation remarks are very important parts of that documentation and form the main part of it. ...
    (microsoft.public.vc.language)
  • Re: Is C99 the final C? (some suggestions)
    ... > that someone will try compile their stuff on an old compiler. ... > because the ANSI standard obsoleted them, and everyone picked up the ANSI ... fixed by using another language. ... >>are multiplying two expressions of the widest type supported by your ...
    (comp.lang.c)
  • Re: Modernizing Common Lisp
    ... > worry about the idiosyncrasies of their vendor's network API or threads ... While a "standard" API is all peachy and wonderful, ... ANY LANGUAGE, IN 2004, WHICH PURPORTS TO BE GENERAL ...
    (comp.lang.lisp)