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 question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Is the D language a credible alternative to Java and C++? What will it take to become a credible alternative? Should I bother learning it? Does it deserve evangelizing?
The main reason I ask is that with the new C++ standard (c++0x) almost here, it's clear to me that the language has gone well past the point of no return with respect to anyone ever understanding it. I know that C/C++ will never die but at some point we need to move on. Even COBOL had its day and Java has in many respects undone C++. So what's next? Does D fill the bill?
What determines the success and popularity of a programming language for real-world software development is only partially related to the quality of the language itself. As a pure language, D arguably has many advantages over C++ and Java. At the very least it is a credible alternative as a pure language, all other things being equal.
However, other things matter for software development - almost more than the language itself: portability (how many platforms does it run on), debugger support, IDE support, standard library quality, dynamic library support, bindings for common APIs, documentation, the developer community, momentum, and commercial support, just to name a few. In every one of those regards, D is hopelessly behind Java, C++, and C#. In fact, I'd argue it's even behind so-called "scripting" languages like Python, Perl, PHP, Ruby, and even JavaScript in these regards.
To be blunt, you simply can't build a large-scale, cross-platform application using D. With an immature standard library, no support in any modern IDEs (there are plugins for both Visual Studio and Xamarin Studio/MonoDevelop), limited dynamic/shared library support, and few bindings to other languages, D is simply not an option today.
If you like what you see of D, by all means, learn it - it shouldn't take long if you already know Java and C++. I don't think evangelism would be helpful - at this point if D is going to succeed, what it really needs is more people quietly using it and addressing its major shortcomings like standard library and IDE support.
Finally, as for C++, while most agree the language is too complex, thousands of companies are successfully using C++ as part of a healthy mix of languages by allowing only a smaller, well-defined subset of the language. It's still hard to beat C++ when both raw performance and small memory usage are required.
Just to add my own experiences into the mix:
About a year ago I worked on a small scale game project (3 coders) lasting 3 months, where we used D as our primary language. We chose it partly as an experiment, partly because it already had bindings for SDL and some other tools we were using, and mostly for the benefits is appeared to have over C++.
We loved using it. It was quick to learn and easy to write. Many of it's features proved invaluable, and I miss them having gone back to C++.
However, the following points made our lives more difficult:
There was no good IDE at the time which was a major issue. We ended up making our own by customising Scite. This worked ok, but was not ideal.
There was no debugger at the time. We managed to get WINDBG to work on a hit-or-miss basis, but it was unreliable. Debugging code without a debugger made life hellish at times.
There were 2 standard libraries to choose from at the time (Tango and Phobos). We started with one, switched to the other, and really needed a mixture of features from both (Tangobos!). This caused headaches and some code re-write.
Bindings to other tools not available. In the end we had to switch to DirectX (for reasons I won't get into). There were no bindings for DirectX available so we had to write our own in C++, build it as a .dll and bind to that. This was fairly nasty work and took some time.
Overall, we loved to write D. It made actually writing code easy and was quick to learn. The issues I've mentioned echo the answer that has been accepted for this question - it's the "extra" bits that need addressing in D, the core of it is solid.
I agree that C++ is becoming a dead-end language - and it pains me to say that, after having used it for the last 17 years.
I think D is the rightful successor to C++. From a language perspective it "does all the right things" (even if I don't agree with every minute decision). I think with C and C++ on the decline there is no other systems level language that can really do what they do, while holding itself up in the world of modern languages - except D! Not only does D fill this role - it excels at it! A look at D1.x should be enough to convince you of that - but when you look at D2.0 it blows you away. It is my opinion that there is no other language around today that works as well as D2.0 in bridging the imperative and functional programming paradigms - which is only going to get more significant in coming years.
Lack of mainstream acceptance - or even visibility - as well as large scale, mature, libraries - are an obstacle of course. However I don't think you can write it off because of this. I am convinced that D will grow to become one of the most important languages around within the next few years - and those that are taking it seriously now are going to be well placed to take the lead when that time comes.
I think the difference is going to come about due, in large part, to Andrei Alexandrescu's involvement. That's not to discredit Walter Bright in any way, who has done a momentous job in bring D to the world. But Alexandrescu is an important, and compelling, figure in certainly the C++ community - and there's where most of the potential D switchers are going to come from. And he has also made a significant and important contribution to D2.0 in its support for functional programming.
It may still turn out that D is doomed to be the Betamax of systems level languages - but my money is on it turning around within the next two years.
I like that D is the work of a genius, primarily one mind - Walter Bright, whose Zortech compiler was fantastic in its day.
In contrast C++ is too much design by committee, even if Bjarne is an influence. Too many add-on features and weird new syntax. This difference reflects in the ease of learning and ease of everyday use, fewer bugs.
The more coherent languages lead to better productivity and programmer joy - but this is subjective and arguable! (i guess i should vote my own answer down)
D is a good language and decently popular, but like all languages, it is just another tool. Which tool to use depends on the kind of person you are, how you think, the environment you are working in, what restrictions of the languages apply the the program, and most importantly, the program itself. If you have the time, I would definitely recommend learning D. Worst case scenario, you will never use it. More likely you will learn what aspects of it you like the most, and under what conditions it shines brightest, and take advantage of that for when making new programs.
I would recommend looking at the D comparison chart to see what the features are for the language and see if it sounds right for you.
D language is modern. No language is perfect, and there is no doubt about this. But languages are born to make life easier. Where D language compared to C++ has lot of good features, in terms of complexity. Many other language combination specialty is involved, which helps coders to code faster, with TOP features introduced by other languages. Please see also:
for more details about D and other languages
D vs C++, is the compatibility, where huge C++ languages are involved and requires compatibility with D. D allow already 100% compatibility with C, which is a good win still.
D vs C++, C++ is my opinion very nice language, but its hard to code, and time consuming, requires more and more experience to get success, but D allow to do the same with simplicity
D vs C++, i am not sure if C++ does, but D do allow none type restriction variable assignment using "auto", which is good to have a variable dynamic, when require you can make a strict type
D vs C++, if you have other language experience, you can straight get started with it, it has easy learning road map, and its getting designed by a strong experienced team and company support
D vs C++, the very nice thing i found of D, is the code style, it gives the look and feel exactly the same like C/C++, while coding it reminds i am doing really modern C/C++ which called D
There are lot of more good reason for D language, there is no reason to underestimate any language, its always the user choice.
It really depends on what your needs are - large scale commercial applications written in D do exist on the server side, and for that D (typically using Tango/Mango) is a perfect fit, and you are likely to be able to serve more requests than with any other language/platform.
For more specialized solutions in terms of protocols and interactivity (which many are) you will have more problems finding the needed libraries, and the lack of tools is likely to affect you more.
D is pretty impressive, and Andrei's book about it is well-written. But as others have said, you need the tools and the platform support. GDC may, over time, be the answer to both.
Have you seen this?
"GNU Debugger adds D language support":
http://www.linux.com/news/enterprise/biz-enterprise/358956-gnu-debugger-adds-d-language-support
Also, the digitalmars site has pages discussing interfacing to C and C++ (for those libraries you just can't live without). I wonder if there are any tools that, given a C header file, will take a stab at writing the D prototypes.
Personally I wouldn't at this point push for doing a large project in D, but I would use D for in-house tools, getting experience with it and introducing others to it.
The original question was whether D is a credible alternative to Java and C++. I don't think D and Java are really going to compete much in practice; D competes with C++ and now Go. Other questions address the differences between D and Go, but Go is generally considered easier to use. So I suspect that the future of D depends a lot on how much room there is for it to breathe between C++, the current king of the hill, and Go, the much easier alternative that has Google's backing.
UPDATE: I just discovered that my favorite chapter of Andrei's book, the one on concurrency, is available for free online. Definitely worth a read!
And here's a loooong discussion about the relative merits/objectives/approaches of Go and D.
It looks like the question has been answered. D is the better language compared with C++.
The question of whether for practical purposes D has better infrastructure around is secondary.
In short if they are both brand new languages without any support around them D is the better language, ergo it is the better language.
As a language, I always felt that D is closer to C# than C++. Not in features and libraries, but in "feeling". It's much cleaner,nicer ... fun (than C++).
IMHO the biggest obstacle in becoming a credible alternative is tools,IDE and debugger. If D overcomes some obstacles of widespread usage/adoption, more tools and libraries will manifest. (I myself will return to D, if there will be an usable IDE and debugger.)
Works great for my own pet projects. I'd use it for employers' projects but for not knowing how hard it would be for them to find someone to take over the source after i move on. There are no technical reasons to avoid it, at least on the supported platforms. (knock on wood)
One approach is to search for jobs in your area. Find the jobs you would like to do and see what skills they are asking for. If they are asking for C++ or Ruby or Oracle or D, then that is the skill which is mostly to help you to get the job you want.
It looks like a very well designed language; much better than C - C++ - Objective C.
I can live without an IDE or a debugger for a while, but not without a good, documented library for D 2.0.
I'll check back in 6 months...
Related
I may be posting a premature question, and maybe I'm just freaking out for no reason, but the way Oracle is handling Java is not very promising. I am a nerd who fell in love with Java from the first sight, and use it all the time in my personal/freelance projects but now I am thinking of a replacement.
I am fluent in C#/VB.NET too but I am looking for something more like:
Open Source
Compiled
Cross-Platform
Object Oriented
Large standard library
Extensive documentation
Web development is a major plus
I was thinking about a compromise: Python/Django for web development (or PHP), and Qt for thick client development. Anyone with better thoughts?
Not so long ago, I decided to explore away from the JVM. I set foot on python, and even though i'm nowhere near the expert/ guru level, I dont regret it. Didn't choose C# (considered it) because I consider it to be more of the same. I alredy know (and like a lot) C++, so python seemed like something new, which is what I was looking for.
It fullfils many of your requirements. Particularly, i'm decided not to learn PHP, so the web frameworks in python came in great.
Not to mention, Python has a large community (also see here), always eager to help and teach, which I consider to be very important.
Just my two cents.
Might be worth loking at the other JVM languages - Clojure and Scala are the two I personally think are most promising.
Yes you are on the JVM, but you're pretty independent from Java the langauage and don't have to use any Sun/Oracle implementations if you don't want to.
Having said that - I think that you are worrying a little too much about Java, too many players (including Oracle!) have too much invested to let it go too far off course.
Try Scala. It looks extremely elegant and promising. Being object oriented and sharing a lot with java in a very concise manner.
Everything you said points to C#, except for the Open Source point.
To fix that, there's Mono.
You could try D. My one-sentence description of why it's an awesome language is that its generic programming/compile-time introspection/template metaprogramming facilities are good enough to give you almost flexibility of a duck-typed language, while its execution speed and static type checking rival or exceed C++ and C#.
I think it meets your requirements quite well.
Open source: The frontend to the reference DMD implementation is open source (the back end isn't due to restrictions beyond the author's control). Work is underway to glue the reference frontend to open source backends such as LLVM (LDC) and GCC (GDC). In the case of D1 (the older version of the language) the LLVM port is fairly mature.
Compiled: D is meant to be compiled to native machine code, i.e. raw, inscrutable hexadecimal numbers.
Cross-platform: The reference DMD compiler supports x86 Windows, Linux, Mac OS X and FreeBSD. GDC and LDC will likely support a lot more CPU architectures.
Object oriented: D isn't a "pure" OO language in the Ruby sense of everything being an object, or in the Java sense of not supporting any other paradigm. It does, however, fully support Java-style OO as a subset of the language, along with procedural and functional style programming.
Large standard library: D1 has Tango, which qualifies. D2 has Phobos, which is not "large" yet by modern standards but is larger than C or C++'s standard lib. However, recently there has been a large interest in contributing and Andrei Alexandrescu (its main designer) has accepted several new contributors, including myself.
Extensive documentation: The standard library and language are reasonably well documented at the Digital Mars website. There's also Andrei Alexandrescu's book "The D Programming Language".
Web development: This is an admitted weakness. D doesn't (yet) have a good web framework, though its native unicode support and excellent generic programming support should make writing one relatively easy.
I too would like another Java-like technology to come along. Lately I've been doing Flex/Actionscript. While I really enjoy it, Actionscript technology seriously lacks the elegance that Java has. Adobe can write some good cross platform APIs, but they just don't have the head capital to build elegant languages and compilers. I've also tried Ruby, but the VM for Ruby is really bad. I've gone back to Java after my flirtation with other technologies and I think it's because the language is good enough, but the JVM is by far the best out there.
So do you want to stay with the JVM or do you really want to the leave the JVM altogether? Staying on the JVM there are lots of options: JRuby, Scala, Groovy, Javascript, Clojure are the big players. However, there are tons of great languages that can take advantage of the JVM's features.
Leaving the JVM there are still good options like python, ruby, and erlang. But you give up some of the nice features of the JVM like performance (big one), and the ability to drop down to a nice language like Java if you need speed. Those others mean using C or nothing at all.
I finally stopped worrying about Java's future. Sun did all it could to screw it up and it still turned out pretty darn good. I think Opensource has a lot more influence over Java's success than Oracle or Sun could ever have had.
I can't post comments yet, so I'm posting an answer related to the Python discussion. Though Python isn't compiled to machine code, there is a Python-to-C compiler called Cython, which can compile nearly all valid Python -- closures are finally (!) in the latest development release. It's have a big impact on some parts of the Python commmunity, e.g., I was at Euroscipy recently, and over half the talks mentioned Cython.
I personally don't like PHP, but it does meet all of your requirements. It doesn't officially support compilation but there is the Hip Hop project which compiles PHP to C code. Facebook is currently heading up this project.
That said, I highly discourage you from using it :)
C# is the only thing that will meet your needs and not feel hopelessly archaic, or frustrate with limited library. For open source/non-windows, use mono. It's a good, mature implementation of most of what's important in the CLR.
Some things (WPF, WCF, etc) are "missing" from mono, but these aren't so much part of the platform as they are windows-specific proprietary toolkits. Some of them are being implemented slowly in mono, some aren't. Coming from java you won't miss them because you're looking for a platform and good standard libraries to build upon, not a gui toolkit or whiz-bang communication framework.
As far as a platform to build stuff with that's "like" java and offers similar levels of functionality, C# + CLR is the clearest option.
Using also Cython you get the best of the two worlds , the ability to code in python , the ability to code in C and C++ and of course compile your code and the ability to use both python a c/c++ libraries out of the box. And if you dont like C++ syntax , cython syntax is python syntax and more.
link text
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 question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
over the years i have been employed in a permanent position with firms that did their development work in Windows SDK, VC++, and most recently Java; in my own eyes, I am language independent.
Should I move from Java to Delphi (assuming pay-scale remains unchanged)?
I'm concerned because, for the most part, the net presents a relatively bleak picture for this particular skill.
The TIOBE Index is an often cited source for estimating the popularity of programming languages. Java, C and C++ have been the top 3 for a very long time. As you can see, Delphi is a lot lower on the list (at position 10 at this moment). (Ofcourse you should not take the TIOBE Index as an absolute measure, but it does indicate something).
This can be an advantage as well as a disadvantage. There are probably a lot more Java and C++ jobs than there are Delphi jobs, but there are also a lot more Java and C++ programmers than Delphi programmers, so it's harder to stand out as a Java or C++ programmer among the masses. Having a specialism that not many people have, such as for example Delphi, may help you get a higher salary, though you'll have to search harder to find Delphi jobs.
Depends on what your goals are, but I believe that for regular apps the future bears name "GWT", i.e. Java. (I consider Delphi a history for quite a while, but that's JMO.)
It's definitely worth learning Delphi. A lot of software's still being written in it, stuff which people use and rely on. A lot of companies prefer to keep quiet about it, though, since it presents such a major competitive advantage over other, more popular languages.
For example, you ever work with VOIP on chat programs? In my experience, there are two basic categories: Skype, and The Other Stuff. Skype "just works", while the others tend to be very glitchy and unreliable. And it's no coincidence that Skype's written in Delphi while (AFAIK) none of the other chat programs are. That's just one example among many.
It never hurts to pick up another skill, but I haven't seen any Delphi job listings anywhere. I suspect you would be better suited picking up a new language/framework/platform with more "legs", such as WPF, JavaFX, Objective-C/Cocoa, ActionScript/Flex, or something of the like.
As a technical move, it's probably a good one -- Delphi is better thought out and more enjoyable to use. From a career perspective, however, you're probably right -- Delphi has been rather marginalized for some time now, and doesn't seem to be in the process of making a huge comeback.
I was using Delphi before I swtiched to C++ and then to Java. I don't think that moving from Java to Delphi is wise idea. Why so?
Java is widely used
It's easier to find Java job
More years of Java -> Better chance getting senior position job (java oriented)
Java is definitelly richer as for libraries
Java rocks in enterprise sphere, Delphi doesn't
It's easier to find resources for Java - from tutorials for beginners to manuals for professionals
Java runs on other operating systems by default, remember? (I know Lazarus, but can't compare port to nativeness)
From my exprience, more experienced programmers and software engineers kind of condemn Delphi programmers ...
Java is suitable for larger projects (means bigger money)
The only good reason for preferring Delphi over Java I can actually think of is making Windows GUI application. But since we have .NET and wonderful WPF, Delphi doesn't score even here.
You make your choice, but personally, I'd never switch back to Delphi (ok maybe if payment was too good to reject:))
The way you phrase your question makes me think you've got a job offer already for a Delphi developer position. If the language is the only thing stopping you, I say you should go for it.
It will add experience with another language to your resume besides being fun (learning something new). Just make sure you keep your skills in Java and C++ reasonably up to date when or if you need to move on.
Why limit yourself to one language?
A major problem with Delphi is that some people consider it an "easy" language. So there are Delphi programmers that can drag some controls to a form without any real coding knowledge. So if you are a good developer and skilled in Delphi, you won't have that much trouble finding a job.
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 question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I've been writing Java professionally for the last 5 years. Recently, I've had to dig into JNI a bit to call some Windows specific functions.
This experience has highlighted my poor command of the C (or C++ for that matter) language. My only introduction to C was a brief "dummies" book that I read in high school 11 years ago.
I know that both languages have advanced in that time frame, especially C++ and the standard library.
Would it be appropriate for me to learn C or C++? Which books would be best?
Do folks also have any recommendations for Windows programming as well? I can read through MSDN well enough to figure out certain API calls but I have a feeling I'm missing things in regards to the "big picture".
Thanks
Good question. On the surface, it'd be obvious to recommend C++, because "it's object oriented like Java". Only problem is, it's not really true.. C++ allows OOP, yes, but it's just one of several paradigms that C++ supports. Treating C++ like a OOP language (and especially, treating it like Java) will only lead to frustration.
The problem is that Java and C++ don't actually have much in common. Java programmers often believe that Java was inspired by C++, but that's only true if by C++ you mean the very earliest versions of C++, which might more appropriately be called "C with classes".
Since then, C++ has transformed completely into its own language with its own way of doing things. It has probably changed far more since then than Java has. A Java programmer back then would still be able to make sense of today's Java code. Not so for C++. So I'd argue that C is actually closer to Java than "modern C++" is. C is what you get if you take Java and strip away the GC and the concept of classes and a few other abstractions. To arrive at C++, you have to add a similar number of features to our hypothetical stripped-down Java as well.
Further, C++ is a remarkably complicated language, and learning it well takes ages. And if you don't learn it well, you're going to shoot yourself in the foot over and over again.
Finally, it depends on your objectives.
C++ is a much more modern language than C, and once you learn it, very expressive and powerful and, surprisingly, it can even be very elegant and concise. But the learning curve is nasty. So for native programming in the long term, I'd recommend C++ over C.
But if your goal is primarily to interface with the Win32 API (or other native API's for that matter), you won't need C++. Win32 and most other API's are written in C, not C++, and you most likely won't need very complex code to interface between that and Java in any case.
About learning Win32, you're right, all the details you need are on MSDN. If you want the big picture, Petzold is the book on the subject.
I guess it depends on your objectives.
If you want to get closer to the machine, then C.
If you want to supplement you knowledge of a OO Java-like layer above C, then C++.
Accelerated C++ (sanitised Amazon link) is an awesome book to learn C++ from the point of view of C++ and not just C with other bits tacked on,
And K'n'R C (sanitised Amazon link) is still the way to go for learning C IMHO!
BTW For C++ follow up with the wisdom of Scott Meyers in the Effective C++ books! And his Effective STL book as well.
HTH
cheers,
Rob
Learn enough C++ to use it as "a better C". You don't have to try to map all of it onto your understanding of Java. All you want is to be able to use C++ objects as abstract data types, new and delete, etc. If STL comes along for the ride, so much the better.
The real question is: Why do you think that JNI is such an absolute necessity? The Windows calls will ruin any thought of keeping your app portable. I'm sitting next to a guy who's having to dig into a Java app that uses JNI. It randomly brings down a server with a SEG FAULT. His hypothesis is that the heap fills up, a JNI call is made to a routine that calls malloc to allocate space on the heap. It's not available, the routine doesn't check the returned pointer for null, deallocates it, and down comes the server. He's still trying to reproduce the error locally, because it requires precise timing to call the JJNI method just before the GC starts up.
100% sure they're required? Just asking....
If you have a good understanding of Java, I'd recommend that start with C, if you start directly with C++ there're a lot of differences between it and Java, and you probably will dislike it.
If you are serious about learning both languages I'd recommend "The C++ Programming Language" by Bjarne Stroustrup, and "The C Programming Language" by Dennis Ritchie.
I think that C++ would be much easier for you to become proficient in than C.
If you've been using Java, you'd have a hard time doing away with conveniences like classes, exceptions, a form of references, dynamic binding, etc. and of course, decent libraries.
However, you should learn C first to make sure you really understand what's under the hood and get to experience pointers and their use and the feeling of working "with no protective gear".
Once you master that, learn about the inheritance mechanisms in C++ and how it's different from Java (e.g., multiple inheritance).
This really depends on your strengths and weaknesses. If you really like design patterns, then I'd suggest using C++, but if you just have to implement a couple simple methods in JNI, then I would recommend C. Learning C before C++ should give you a better understanding of memory management without having to worry about some of the complexities of C++ (constructor call order, destructors, and other differences between C++ and Java).
I would suggest "The C Programming Language" by Kernighan and Ritchie as the definitive manual for learning C. http://www.amazon.com/Programming-Language-Dennis-M-Richie/dp/0876925964
If you're on a *nix system, there's ample documentation in the manpages for different functions. For example,
bash$ man malloc
If you want an excellent resource for C, "The C Programming Language" by Dennis Ritchie is the book to get.
If your intent is to continue writing JNI code then I'd definitely recommend C++.
In particular, the JNI interface requires you to acquire (and subsequently release) references to Java objects. Using C++ auto variables you can get these references using 'RAII' (Resource Allocation is Initialisation) techniques which makes memory management far simpler.
100% sure they're required? Just
asking....
Unfortunately, yes.
Thanks everyone for your answers.
To answer some of the follow up questions, I'm not looking for a career change to C or C++. I'd just like to learn the fundamentals so I don't feel like I'm flying blind when I do need to write bits and pieces.
In particular, the JNI interface
requires you to acquire (and
subsequently release) references to
Java objects. Using C++ auto variables
you can get these references using
'RAII' (Resource Allocation is
Initialisation) techniques which makes
memory management far simpler.
Thanks, that is helpful. One of the areas that stoked the growing concern in my stomach was dealing with manually managing the memory associated with the JNI objects
If your "main goal" here is to do windows programming, I'd recommend C# over C or C++. However I believe every programmer on Earth, and in Lower orbit, SHOULD know C. Not knowing C++ is acceptable, although you might not get invited to a few parties :) But C is something of a rite of passage, between Applications (high-level) programmer and Library (low-level) programmer.
Let me first of all say that I'm NOT interested in a flame war about what is better: .NET or Java... PLEASE don't post if you want to tell me how killer .NET is or how Microsoft is the evil empire so there is no way that a developer with a soul could write .NET or whatever. We've all heard it far too much before.
What I'm interested is who out there in the industry can really accurately and fairly compare and contrast the details of the two platforms. I'm looking for the rare industry luminaries who are experts in both platforms and discuss the two in reasonable terms. The only dude I'm aware of in this realm is Ted Neward if that gives you an idea of what I'm looking for. Ultimately I'm interested in their opinion of how the two platforms influence each other and what new things happening on one side are working well (which might give me insight about how the other platform is likely to evolve).
Martin Fowler has written about both.
Ron Jeffries would be another who has written a lot about java and has more recently written a fair bit about C#
I'm no Ted Neward, but I'm reasonably experienced in both Java and C#.
Despite Microsoft's early draft of the C# spec claiming that it is a mixture of C++ and VB, clearly Java was a massive influence. Since C# 1.0, however, I would argue that C# has been the language driving innovation. (Okay, a lot of the new features have already been present in other languages, but not Java...)
A lot of the proposed features from Java 7 look very much like they've been influenced by C#, but I wouldn't be surprised if they were under consideration before C# got them (just like generics in Java were being developed for years, and in the other direction there were research projects with generics in .NET before .NET 1.0 was even released).
What does the future hold? Well, personally I'd like to see a true Java 2.0 which ditches backward compatibility in order to clean up some of the messes of the past - and largely make it like C#, but with the existing platform independence. Nothing in the language of C# is tied to Windows. From that side of things, it's a real shame that Mono hasn't gone further (or been supported by Microsoft, other than Moonlight).
I have worked with both platforms since .NET was created, mostly in dual-language projects.
Java is the "spanish" of languages (written spanish has changed little for the last few hundred years or so), C# is english (most of us are unable to read 200 year old english literature)
C# has "all the bells and whistles" added nice and clean into the language. Java is fairly primitive in comparison.
Java has a huge choice of competing libraries and different ways/styles of coding, .NET is much more "single choice"; often a good choice has been done by microsoft for you. These arguments objectively lead no-place in particular; some people may consider having a lot choice is good, others may think it is an unnecessary expense. My current java project is using NONE of the libraries I used in a similar project 5 years ago; so although the language is the same the programming environment (libraries, IDE) has improved by an astonishing amount.
So as a developer I prefer C#. Still, by choice, I work in Java right now, and will continue to do so for the foreseeable future - still by choice. Although java the language evolves painfully slowly, there area a lot of really interesting things going on in java. The rest of my choice is based on all the things you specifically don't want to talk about; openness, the dark side and all that.
The company I work for has about half of it's development in Java (internal apps) and half in .Net (public facing apps). What is it that you want to know? there are several people in the company I work at that can contrast and compare. I admit to not knowing Java all that well though. Are you looking for specific articles, bloggers, or books?
If you are looking for a person which has compaired both frameworks Java vs .Net, then I do not have a name, however there is one KEY phrase I would like to make you very aware of
Type erasure
Generics in Java <- its mentioned here, I came accorss this by word of a work friend. (Im not sure when there will be a fix for this)
This would mean java will always be boxing and unboxing.
with reference to krosenvold
Java has a huge choice of libraries
and different ways of coding, .NET is
much more "single choice". This is
good and bad both ways.
Im not quite sure what he means by this. If i were to second guess this, you are referencing .Net's DataTable. and how .Net (used) to be data centric not domain driven?
If so I would like to mention .Net has a movement called "Alt.Net" AKA "NHibernate Mafia" where there are a number of open source libraries to allow the .net developer to do ORM/DI/MVC/TDD etc. With many of the libraries having roots from the Java world (spring, hibernate) However this is not core to the .Net or even Java Frameworks.
I would suggest considering what you want to compare.
for instance
Frameworks (including the
community/opensource ones)
Limitations (Java is 1 language, but
works on multi OS, .Net is multi
languge, yet "offically" supports
windows platforms, using Mono)
Avaliable IDE's
Here are some links to get you started.
Comparison of the Java and .Net platforms
Comparison of Csharp and Java (look for instance, they handle Enumerations differently)
HTH
Bones
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
What do you think the next evolution of languages will look like?
You might assume C and C++ are being "phased out" and that Java/.Net/Python/whatever is an "advance" or the "next stop".
They are all used heavily (see the number C or C++ of tags on this site). The difference is that neither one is the lingua-franca of the programming world anymore. It used to be that the majority of apps were desktop or DOS apps on systems with very limited resources, furthermore all the major desktop APIs were written in C or C++. So everyone learned these.
Now its more complex. Languages are becomming more application specific. C/C++ for when performance is important. Scripting languages for when your main performance hit is db reads/writes. Java and .Net for generic, non-performance-critical desktop apps.
Its the same thing with computer or electrical engineering. In the past these were huge fields at the highest level of abstraction available. Now we have all sorts of higher levels of abstraction. Still, we need people to do this lower-level kind of engineering. They are still in demand. In the same manner, C will continue to be used in many environments, as will C++. You'd be crazy, for instance, to think that you could write a device driver in Java, you'd also be mildly crazy (but perhaps less so) to write a full fledged GUI app in C if you had the choice and ability to do it in Java or .Net.
Each tool has its purpose. I expect C, C++, and Java to evolve and continue to be used for new and legacy development.
I can't speak for C++ and Java, but C definitely ain't goin' nowhere...
It's pretty much unthinkable to write any kind of operating system kernel without most of it in C (well, you can use assembly language entirely if you are really stubborn :-P).
C is basically a thin wrapper of niceness around assembly language. It's so tightly coupled to a standard Von Neumann CPU architecture that no standard library or runtime is required to implement most of its features: pointers, character strings, automatic variables on the stack, integer arithmetic, etc.
For the same reasons, C is great for user-level applications that absolutely demand high performance, things like multiplying huge matrices or parsing complex languages. It may be a pain to write a parser in C, but the speed and efficiency advantages of manual memory management are hard to pass up...
Alan Kay once said "Actually I made up the term "object-oriented", and I can tell you I did not have C++ in mind."
He is working on changing the future of programming
"The real romance is out ahead and yet to come. The computer revolution hasn't started yet. Don't be misled by the enormous flow of money into bad defacto standards for unsophisticated buyers using poor adaptations of incomplete ideas." source
Well, I might add that Bjarne once said "There are only two kinds of languages: the ones people complain about and the ones nobody uses."
Languages evolve to fill a niche problem that is not covered by other languages.
Weather that language gets a foot hold and establishes itself is another question entirely and has a lot to do with popularity.
What comes next?
The problem I see that needs filling is multi-processors (or multi-cores). Currently all the popular languages have very limited ability to exploit the additional cores. Basically all current popular languages give the developer the very basic objects (threads/locks etc) to use the cores and then leave it up to the developer to try and exploit the parallelism available from multi-cores.
It would be a nice to have a language that abstracted away the concept of cores (even threads) and could automatically exploit the enherant parallelism available from multi-cores/multi-processor architecture. Unfortunately all these languages (that I know about) are still research projects at universities and are unlikely to see real adoption any time soon.
You imply that there was a progression C -> C++ -> Java.
That's a bit artificial, each language represents a method of solving problems and each language has inherent problem domains where it is efficient at solve a problem and other problem domains where that language would be a bad choice.
Personally:
I would never write a device driver with Java.
I would probably not write back-end web module with C (you probably can but not me)
etc.
C# ? -- oh, but that is Java :) (sorry, couldn't resist)
The next generation of languages is already here, Scripting ones. Its no mistake that Microsoft is working on the DLR (dynamic language runtime). I think the future will be interpreted (but JITted), dynamic languages that have few constraints and lots of flexibility.
Performance constraints for the majority of languages are not so important nowadays, or no-one would be writing Java or C# apps at all, but considering CPUs are super-fast, and RAM is cheap, we don't notice the inefficiencies of these higher-level designs (eg if you have a 1mhz cpu, you write your code in C, not C#. If you have a CPU running at 3Ghz, you write it whatever you like)
So.. Ruby, Python, "Dynamic-C#"... these are the future. When MS releases the DLR, expect a lot of interest in it, expect a lot of companies to start talking about programmer productivity as the most important part of most application development.
After that.... probably a GUI-driven system where you connect blocks together in a UML-a-like system and add properties to them that produces generated code.
I believe the answer is twofold.
First, client side applications are more and more implemented as browser based applications. To give a browser based application a look and feel comparable to rich desktop application you need something like Javascript. And if you followed the news a bit you see a tremendous effort towards speeding up the javascript implementation in browsers, and a flourishing ecosystem of libraries which help you create a responsive, intuitive GUI with javascript in a browser.
So, for GUIs I believe the future is Javascript.
For the backend, the server, I very much doubt that the near future has a scripted language in store. Server-side software tends to live for years and years, features added, bugs fixed and all. The language in which that is written needs to be not so much fast to write, but easy to read (maintain).
And scripted languages tend to be a bit more difficult to understand if you revisit your code after a year or two to fix that bug. That has (in my opinion) two primary reasons which will not go away in the short term:
IDEs have trouble giving hints with dynamic languages
In the context your working there is by definition less context information available; in Java you know you can only get type X. In a scripted language you should check all referencing code, not easy in a large project
These problems can be mitigated by using very experienced developers, but if, in the future, the only kind of usefull developer is a experienced one we won't need to hire inexperienced ones, which will give trouble in the future.
For those reasons I believe the next-gen server-side language is statically typed. And from the statically typed languages I think C# and Java have the best chances due to the enormous amount of usefull libraries available and the very readable nature of those languages.
As other have mentioned, languages tend to adapt around new technologies and trends. So in order to answer that question, you first have to look at the overall future of computers and see what languages are most suitable for these purposes.
For example, to use your language progression as an example, in the beginning (:-)) there was a need for a language that would make maximum use of the limited resources available, C fit the bill in that regard. As time went on, and the spectrum of software applications incresed there was a greater demand for OO based languages in order to facilitate software reuse, easier design etc. and C++ / Java became popular.
Currently, there is an increased drift in the industry towards server side components that do all the work with thin client UIs (i.e. browsers). So languages that cater for this demand are becomming more popular (Ruby, ASP/Java EE languages).
New languages will become popular when the technology that they are closest to become popular.
Personally (and this is guesswork), I think there is huge scope for a language that truly takes advantage of multi-core systems. This will mean having multi-threading built from the very start and will probably require a change in approach and thinking (like going from procedural to OO).
It's going on a couple years old now, but Tim Sweeney's The Next Mainstream Programming Language: A Game Developer's Perspective is an interesting cogitation on the subject.
What is the future of programming? Away from languages as we know them.
It's 2009 and we're still using text editors? With the project I'm a part of you can build entire applications simply by setting attributes. Outside of (mainly mathematical) expressions and string values, there's not a line of text anywhere.
One of the developers complained that "you can't print out the code," and I replied, "Would a company print out its entire accounting structure? Or would it print out the aspects it wants to see, such as Cashflow Statements and Balance Sheets?" It's only when we move out into new abstraction mechanisms that we can really move ahead.
The future of programming remains to be seen, but I think there are some exciting developments happening that will finally release us from the C/C++/Java harness we've had on for so long.
At some point programs will start writing their own programs making humans redundant as far as programming is concerned. The major disagreement is when this will happen.
If you follow only this branch of programming language history, I think one can write both JavaScript and C#, since they came after the three you mention, share a similar syntax, and took from the predecessors.
Others might mention D or Objective-C (they are already here, of course).
By next language, I suppose you mean "next successful", because there is almost a new language each month...
I think it will be a language with garbage collection, running on bytecode with Jit, highly portable.
I can't tell if it will be object-oriented or functional, with static or dynamic typing, but I would bet on a mix, like does the interesting Fan Programming Language.
Or maybe we are all wrong, it might just a natural language, with spoken or graphical interface: "Take the weather box of this page, change its color and this logo to that, and integrate in my page".
What would be great, in my opinion, is a language like C++ with a more compact definition, better standard library, native garbage collection, and native synchronization constructs. It should be usable by relative novices, but still provide facilities for experts to program in an efficient, low-level way when needed. I believe D meets most of these criteria, but it seems unlikely to me that it will take hold.
On the short term, I expect high level languages to become more powerful and more used. Perl 6 and Javascript 2.0 are good examples of what awaits us.
On the long term, functional languages might make it into the mainstream, but I expect that will not happen any time soon.
D language, especially the 2.0 version has learnt from Ruby, Python and lots of modern languages without keeping source compatibility with C, still allowing for raw access to the metal. The design decisions of this language are a perfect solution for next-generation system and general programming languages, with even functional programming and metaprogramming built-in.
The language question is in my opinion no either or. It allways depends on your application. And since languages have mostly a standard set of libraries that are well suited for this or that application. Languages are tied somewhat to a particular application field.
For Example:
C -> Device drivers
C++ -> Highperformance Computing
Java -> Server side programs (J2EE)
C# -> Server, Client(Silverlight, WinForm, WPF)
Ruby, Python, ... -> WebScripting (Serverside) and helper scripts
ECMAScript (Javascript) -> WebScripting (Clientside)
I think any of these languages are capable to solve any computing program (also performance wise since we have Jits) but they are not used in any field since it is not feasible to recreate every library for every language.
On thing that makes C and C++ special is, that there is a standard library but compared to the others it is a rather minimalistic standard library. To use those languages efficiently 3rd party (non-standard) libraries are needed.
So when choosing a language for a project you look for these things:
Are there the right libraries you can use in your project
Do you know the language
Is it efficient to programm in this language (look at brainfuck)
Does your team know and master the language?
The last thing is also do you like the language? At the end that is the biggest motivation to use this or that language.
So the next step in language evolution will be higher level libraries and concepts to be faster and more expressive. Examples are
Lambda expressions
Linq (C# feature to do sort of sql in the language)
functional programming
variable typing
dynamic typing
not particular language: better IDEs that assists the programmer
Important: Support for easy! parallelism (Axum, Nesl, orca, Chapel, ... ) Here list