开发者

Which language sits between C++ and Java? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this quest开发者_如何学JAVAion can be improved and possibly reopened, visit the help center for guidance. Closed 12 years ago.

I feel the two languages are not enough to rapid build complex but high performance native applications.

I want a language which includes:

  • Compile time type check.
  • Memory pointer, but no code pointer.
  • A VM kind design inside, but not need to be run on VM (like Java).
  • Auto memory management.
  • OOP, but not to be pure OOP.
  • Generics.
  • Reflective operations.
  • Open community.

And one more thing: .NET is always excluded by no reason.

It may tricky to add auto memory management in C++, but it's not so easy to add reflect support.

It's even better if the language can do:

  • Closure
  • Tail recursion


D, perhaps.

I would also suggest looking at Scala or C# (there is Mono, fwiw), but they miss out on the "native target" bit. For most applications they will likely have the required "high performance" -- but it depends upon specific application and functional requirements. (In any case, I would use either of those languages above Java without a second of doubt :-)


Sounds like Scala... However:

Scala is a JVM language. I don't know enough about it to address your pointer concern.

I don't know the state of the technology but I knew some developers who used to cross compile Java to C++. So this would not be a perfect solution but further research in that area might be interesting.


C++0x (when it ever comes out)


Google is pushing Go quite a bit, which might hit the sweet spot.


I suggest you look at Java again. It has all those features and the JIT can produce native code which is a efficient as using pointers.

I suggest you try the OpenJDK 7 debug version and use -xx:+PrintAssembly to see the native code which is generated.

Perhaps you have other requirements, but from what you have written Java meets them all.

BTW: You may find Excelsior JET interesting as it a Java to native compiler. However I find that the JVM does a very good job if you know how to write tuned code for it.


Visual Basic 5 and 6 meets the VM-without-installation criteria when you compile to P-code (they also meet the native requirement if you compile to native code). It also handles memory management for internally allocated objects, though if you want fixed pointers you may lose the automatic handling depending on your usage. It certainly handles quasi-OOP, as you request, and there was quite a vibrant community (if lacking in robust software engineering principles compared to, say, the C++ community).

However, the fact that possibly the most suitable language for your requirements was released 13 years ago suggests that your requirements need work.


C++Builder with its published keyword extension would get you what you want with Reflection. Automatic memory management is not impossible with C++ Builder either (I've written a generational mark-and-sweep GC that is used in a lot of our production software). You also get everything else that comes along with native C++.


WhiteSpace is the cool new language in town :-)

1 Compile time type check.
-> Statically typed (no runtime types so must be static by definition)

2 Memory pointer, but no code pointer.
-> Definitely no code pointers. No need for memory pointers.

3 A VM kind design inside, but not need to be run on VM (like Java).
-> The White space interpretor is written in Whitespace.
-> This shows the language can be easily implemented in VM method.

4 Auto memory management.
-> All memory is managed automatically.

5 OOP, but not to be pure OOP.
-> Fails on this. Its procedural

6 Generics.
-> Functions can be made to work on any width integers.
-> So generic to an extent.

7 Reflective operations.
-> Does not need them. All types are integers.

8 Open community.
-> Yep. They will accept anybody that want to help.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜