1

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
Lenik
  • 13,946
  • 17
  • 75
  • 103
  • 7
    Sounds like you want C# that isn't C#? – GManNickG Jan 18 '11 at 02:22
  • 4
    'And one more thing: .NET is always excluded by no reason.' - why, when it satisfies your exact requirements. – Michael Shimmins Jan 18 '11 at 02:25
  • 2
    Because it's not open source. Microsoft always creates magical stuff, you will never got any idea inside it. I hate COM/DCOM for the same reason, though it's good. You won't master COM forever until you have the source, but you'll never have it. – Lenik Jan 18 '11 at 02:29
  • Anything with automatic memory management is going to require something like a VM. That is, after all, the main service the VM provides. – Billy ONeal Jan 18 '11 at 02:30
  • So what? You don't need the source to be able to use it. – GManNickG Jan 18 '11 at 02:30
  • 1
    @谢继雷: Oh, so the fact that the JVM is closed source doesn't bother you, but that the CLR is does? – Billy ONeal Jan 18 '11 at 02:31
  • Maybe you should take Boehm garbage collection library into use with C++. – Öö Tiib Jan 18 '11 at 02:37
  • 1
    @Billy ONeal most JVM implementations are open source see: http://stackoverflow.com/questions/2026093/is-jvm-open-source-code-if-not-how-can-i-get-code-of-jvm but OSS != FOSS. Although some of the implementations are FOSS too... although there are usage limitations on what may be called a JVM. The promise of the JVM is that Java Byte code will run cross platform... I posted further down on MS vs Sun which states that although free is desirable full freedom would result in broken Java (Intentionally for gain). – Quaternion Jan 18 '11 at 03:00
  • 2
    The source code to .NET is available. – JBrooks Jan 18 '11 at 03:01
  • 1
    C# runs fine on Mono - which is FOSS. It's somewhere between Java and C++. – Michael Shimmins Jan 18 '11 at 03:15
  • 2
    Voted to close since C# (and its mono implementation) is what the OP is looking for but he has degraded this into an argument. Useless question. – Tim Jan 18 '11 at 03:17
  • 1
    @Quaternion: Maybe when Sun was running the show that would have made sense, but Oracle has an even worse reputation w.r.t. OSS than does Microsoft. – Billy ONeal Jan 18 '11 at 04:45
  • @Billy ONeal, both the future of the definition of .NET and the JVM lies with the IP holders. This is a concern for long term investment in either technology. One is partisan to a particular OS the other is not. Although Oracle re-branding everything overnight and seemingly ignoring the Java Community process hasn't gone by without a _little_ bristling. – Quaternion Jan 18 '11 at 05:42
  • 1
    @Quaternion: Hmm.. guess I have to uninstall all this mono stuff from my POSIX boxes then. – Billy ONeal Jan 18 '11 at 05:44
  • @Quaternion: How is .NET "partisan to a particular OS"? .NET implementations exist for plenty of OS'es. – jalf Jan 18 '11 at 06:24
  • @Billy ONeal, I guess you could, if you wanted. You know that there is POSIX certification right? There isn't JVM Certification or .NET certification in the same sense. That is, if certified it is POSIX but you _can_ fail POSIX implementation (although you wouldn't be certified) currently you can not deviate from the .NET or JVM spec without getting sued. See: Oracle vs Google. I hope I showed where issue may lie. It may only be an issue for few but I hope that the point was made clear. – Quaternion Jan 18 '11 at 06:32
  • @谢继雷: "Microsoft always creates magical stuff, you will never got any idea inside it." -- Have you tried .NET reflector? – Zach Saw Jan 18 '11 at 06:41
  • @Zach, Yes, I like .NET reflector, but it does nothing to the CLR compiler. The source of framework library is just not enough. – Lenik Jan 18 '11 at 06:57
  • @Zach, C# and the CLR as a resolution do fit my requirement. But, I don't like its overall design, its naming convention, and all its magical inside. It's very simple: choose Microsoft, or not. – Lenik Jan 18 '11 at 07:04
  • @Quaternion: 1. Don't see what a certification has do do with anything. 2. The JVM isn't in the POSIX spec any more than .NET is, so I don't see how that's relevant. 3. When I use the word "POSIX" above I'm not specifically referring to the POSIX spec, I'm referring to boxes which conform to the POSIX spec, which could be any of several flavors of Unix, Linux, BSD, Mac OSX, etc. – Billy ONeal Jan 18 '11 at 15:05
  • @Billy ONeal: You brought up POSIX for some reason, what is it you intended other than seemingly trying to turn it into a straw man argument at the moment. – Quaternion Jan 18 '11 at 21:06
  • @Quaternion: Okay, replace "POSIX" with "*NIX" in all of what I said above. Better? I'm not talking about POSIX versus anything else, I'm talking about the CLR vs. the JVM. What word would you use to encompas Linux, Unix, BSD, MacOS X, etc then? – Billy ONeal Jan 18 '11 at 21:32

8 Answers8

7

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 :-)

  • +1: Also, C# with x86 target and using ngen will produce native code, though you still require the .NET Framework to be installed. (Of course, you can bundle the framework with your installer if you really want to bloat your code and waste your bandwidth on something that most users will already have...) – Zooba Jan 18 '11 at 02:33
  • 3
    @Quaternion: So wait, what Microsoft did 10 years ago, in a different situation with a different and unrelated product scares you? Whereas what Oracle has done over the last months with Java doesn't worry you? Right now, I'd say there's much more reason to be suspicious of Java's future direction than .NET's. Or perhaps you can show me a single case where Microsoft sought to limit the cross platform compatibility of the .NET stack? A single case where they sought to undermine Mono, for example? You can be a paranoid zealot as much as you like, but do you absolutely need to pollute SO with it? – jalf Jan 18 '11 at 06:29
  • 1
    D doesn't have built-in support for reflection. – Zach Saw Jan 18 '11 at 06:35
  • @jalf: SO-ers love Linux and hate MSFT. – Zach Saw Jan 18 '11 at 06:38
  • 2
    @Zach: I know you meant that as a joke, but I honestly don't think it's true. SO has its origins in a .NET-heavy community, and I think it shows *in general*. The site is implemented with .NET and MSSQL, the founders are both Windows developers, and so were most of the readers of their blogs, and those people pretty much made up the early SO user base. On the whole, I think Microsoft and .NET is probably overrepresented on SO. C# is more popular here than it is "in the real world". But uninformed rubbish like what @Quaternion is throwing out doesn't help. – jalf Jan 18 '11 at 12:33
  • @jalf, Look if you actually read that link here it is again: http://en.wikipedia.org/wiki/Microsoft_Java_Virtual_Machine#Antitrust_trial Shows clearly the MS position but in case we don't want to read the pertinant part is that MS has a[quote]"Strategic Objective" described as to "Kill cross-platform Java by grow[ing] the polluted Java market."[/quote] So with loosing the lawsuit .NET shows up the very next year. Right this was about 10 years ago but .NET showed up about then too. Now someone wanted to know where the current spec had platform ties, that is not my issue, it is the future spec. – Quaternion Jan 18 '11 at 19:16
  • ... having supported programs written in RPG (probably 50 year old language by now) I know that even languages undergo code rot. For this reason languages undergo updates. My issue and possibly that of the OP is that by controlling the future of the spec you can tie that to what ever technology you want proprietary or otherwise. Since this strategy was essentially spelled out at the the same time as the founding of the .NET languages by MS you can see that my "garbage" could be reasonable concern to some if not yourself. – Quaternion Jan 18 '11 at 19:37
  • 1
    @Quaternion: if you actually read what I said, I already looked at that link, and I pointed out that it describes actions taken by Microsoft a decade ago, in a very different market situation, with a completely different product. I don't think that tells us much about how they treat .NET *today*. You might also have noticed, if you weren't so blinded by your platform zealotry, that Microsoft has made some pretty major policy changes in the last decade, among other things regarding openness and standards-compliance. – jalf Jan 18 '11 at 21:02
  • 1
    @Quaternion: At the moment, the future of Java is controlled at least as tightly by Oracle as .NET's future is controlled by Microsoft. And yet you're willing to forgive one, but not the other? Oracle has recently done quite a lot of limit the openness of the Java platform. Has Microsoft done anything similar? – jalf Jan 18 '11 at 21:02
  • Forgiveness? One corporation has clear ties to one platform and we have documentation that immediately prior to their failure to eliminate a cross platform threat, they go out and create a solution which is cross platform, nearly instantaneously after? The other corporation _could_ abuse their position... but we don't have it in writing that they had a mission plan to do so! So I'll give them the benefit of the doubt, for now. This is hardly conspiracy thinking I am simply assuming they will continue to do what they were doing. I rest, this is clear as I can be on this issue. – Quaternion Jan 18 '11 at 21:36
  • @Quaternion: What "clear ties to one platform"? .NET certainly runs on my Windows, Linux, BSD, Mac OSX, and Android devices just fine. – Billy ONeal Jan 18 '11 at 21:40
4

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.

Quaternion
  • 10,380
  • 6
  • 51
  • 102
  • 1
    I'll give a +1, but "A VM kind design inside, but not need to be run on VM (like Java)." <-- makes me confused :p –  Jan 18 '11 at 02:27
  • Is there any example software using scalar, and you can start it very quickly like Notepad++? – Lenik Jan 18 '11 at 02:31
  • @pst: IMHO, It's a VM kind design that you won't be confused between bool/BOOL, __int32/long, __fastcall/__pascal, etc. – Lenik Jan 18 '11 at 02:34
  • I'm also tried to convert Java to C++, but that needs a lot of work to do. – Lenik Jan 18 '11 at 02:37
2

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

Daniel DiPaolo
  • 55,313
  • 14
  • 116
  • 115
1

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

Jochen Bedersdorfer
  • 4,093
  • 24
  • 26
1

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.

Peter Lawrey
  • 525,659
  • 79
  • 751
  • 1,130
0

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.

Zooba
  • 11,221
  • 3
  • 37
  • 40
0

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.

BenMorel
  • 34,448
  • 50
  • 182
  • 322
Martin York
  • 257,169
  • 86
  • 333
  • 562
0

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++.

Zach Saw
  • 4,308
  • 3
  • 33
  • 49