Re: "STL from the Ground Up"



"Stephen Howe" <sjhoweATdialDOTpipexDOTcom> wrote:
Such as? F#? Ocaml?

Even C# would be a significant step in the right direction.

In what sense? Because it supports Garbage collection?

For one, yes. There are many other benefits as well like safety, a
high-level intermediate language than can interoperate with many other
languages, run-time compilation and so on.

Garbage collection has been around since the 1950s,

Garbage collection has come a long way since then and remains an active
research topic.

it is good for some problems but it is no universal panacea.

Sure but there are very few problems that GC is bad for, e.g. embedded
devices.

The real power of garbage collection is that it is an enabling technology
for language features like first-class lexical closures that could not
exist usably without it.

And I have seen Herb Sutter's presentation on template support for Java,
C# and C++.
C++'s was the most flexible.

Absolutely. C++'s template system is a Turing complete programming language.
This "flexibility" is one of the reasons why C++ is so slow to compile and
it is the main reason why error messages from template-heavy C++ code are
so obfuscated.

I've made extensive use of both template metaprogramming in C++ and
parametric polymorphism with type inference in SML, OCaml, Haskell, F# and
so on. The latter is simply vastly more productive for a huge variety of
tasks.

Usually a language that provides molly coddling is not fast.

Our products got a lot faster.

My work was impossible in C++ five years ago and I'm quite sure it will
be impossible in C++0x. They are decades behind the current state of the
art...

In what areas are they behind?

Off the top of my head:

.. Static checking.
.. Encapsulation.
.. Pattern matching.
.. Type inference.
.. Interoperability.
.. Run-time compilation.
.. Marshalling.
.. Compile times.
.. Optimizations.
.. Concurrency.
.. Parallelism.
.. Structural typing.
.. Recursion.
.. Closures.

This has an adverse effect on lots of practical applications like parsing
and the manipulation of trees.

--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/products/?u
.



Relevant Pages

  • Re: Garbage Collection - Stop Making Trash
    ... >> cases that require garbage collection. ... > figuring out why anyone would want to perturb a language like ... There are also many programmers who do not desire it. ... Reread and try again. ...
    (comp.lang.cpp)
  • Re: type checking
    ... >it's not far from your favourite SWIG-supported language. ... when its constructor raised an exception. ... It hasn't really been an issue so far, but I guess C# constructors ... This is one issue I already have with Java/C# style garbage collection ...
    (comp.lang.python)
  • Re: Why C# and Java have got it wrong
    ... But I agree that garbage collection in Java and C# is a problem: ... For example, C++, which I love and hate, is not a language well ... work force on almost any real-world project, and much of the reason ... for that complexity is that C++ is not designed with GC in mind. ...
    (comp.programming)
  • Re: Optimizing simple calls in a dynamically typed language?
    ... GC (which is non-trivial due to polymorphism). ... collector in a polymorphically typed language is difficult in ways ... to perform type reconstruction during garbage collection and do not ... Polymorphic Type Reconstruction for Garbage Collection without ...
    (comp.compilers)
  • Re: Java equivalent of C++ Spirit or Boost Graph Library ?
    ... So I'm assuming that he wants his language to feature garbage collection too. ... have to consider /whether/ that property can be engineered into some design is ...
    (comp.lang.java.programmer)