views:

170

answers:

4

What are the programming features that are missing in C++ and Java ?

For eg. You can't do recursive programming in QBasic ? You can't dynamically allocate memory in QBasic.

What would be the good to have features in C++, Java.

I think Lisp Programmers will be able to add a few.

+3  A: 

I miss lambda expressions.

Jonas Elfström
C++ Boos lib provides lambda functionality, see http://www.boost.org/doc/libs/1_39_0/doc/html/lambda.html
tuergeist
+1  A: 

I think this is a very subjective question. From a theoretical point of view there's nothing "missing" in Java because you can do everything you want to from the perspective of the outcome as an application.

As with QBasic - recursion may not be possible but that doesn't prevent you from changing your recursive algorithm to an iterative algorithm. Programming language theory tells us that you can do this with every recursive problem. So there's also nothing missing here.

I think what you mean are features that are "nice to have" - and here everyone has to decide for himself. I'd even say there are features in the language which would have been "nice not to have" such as static imports - but again this is my subjective opinion...

Benedikt Eger
A: 

I guess once you master this or that language enough you can do (virtually) anything in quite elegant ways.

SeasonedCoder
A: 

This answer deals only with C++

Things I miss from the syntax, or the standard library:

  1. RegExp as part of the standard library
  2. Threads as part of the standard library
  3. Pointer to member methods (not objects!)
  4. Properties would be nice (I have seen codes that emulate this via C++ preprocessor... note an nice looking code).
  5. Some lower level networking API (sockets!), and higher level API (give me this file from this ftp, submit "this" to this site via POST).

This is the list of things I would like to see, but I assume other people will disagree with me.

  1. Memory garbage collector is nice.
  2. A n interface for a GUI toolkit - let MSVC map it to win32, and on Linux... (good question!)
  3. A stable ABI. In C it's a standard - but on C++ we are still missing a few decades. I want also stable ABI between compilers - I want to compile one library in MinGW, the other with CL and all should work.

This is the list of things I want to see, but I know they will not get away:

  1. Compatibility with C. Really, it's a myth right now. using namespace std killed it.
  2. Include, headers. Most of the information is already available in the DLL/so/a/"library", do we really need to keep this bad decision from 30 years ago? If needed the compilers should keep information in the binaries.
  3. The need for Makefiles - the compiler should be smart enough to know what to do with this code, from the code itself. Pascal is doing it quite good. I think also D.
  4. (I might be wrong, please correct me) The official standard openly and freely available for viewing. Why should I pay for the official papers? Do I need to do it for HTTP? UTF8? Unicode?
elcuco