“Mono as it currently stands has serious problems, including strategic and intellectual property concerns. Java as provided by Sun is not open source or GPL-compatible and thus a nonstarter. Many strong proprietary companies such as Microsoft are moving full speed ahead on high-level managed language platforms. Can open source compete, or is it too unable to make hard decisions?” Read Havoc Pennington’s article about the future platforms of OSS.
>> Most ignorant programmers are not aware even of the basics of templates,
Yet many use them.
I think you are making a classic misconception I see among strong coders. You appear to be a strong coder, but would likely be a strong coder in any language, and would likely employ the esoteric features of any language. I suspect in another life you could have been a Lisp or ML advocate.
Yet for the average coder C++ has a long history of killing projects. At least have the insight to understand this.
The best thing I would wish on my competitors is a company-wide decision to implement everything in C++.
Theres one issue you might be forgetting which is not the fault of c++. The majority of software projects have managers that are totally clueless to technology and just implement whatever sounds good be it c++ java c# perl.
I have seen this time and time again with all langauges. The manager gets sold a technology tells his programmers to use it and months later the project is a disaster.
I’ve been trully astounded at how few software projects use project managers to begin with and usually those project managers are more about budgets and time lines rather than technology and architecture.
This is one reason i moved away from being a coder. I like to have successful projects and dont like them failing. So I need to know which technologies do what and what their pluses and minuses are. That way from the gecko I can know
exactly what should be used.
Also most people in school do not really get an adequate education about the deeper side of technologies. They are usually just taught enough to get a job and thats it. Unless of course they go to graduate school.
I have met many coders who can write a few lines of syntax but when you ask them a higher level technical question look back at you with a blank stare.
“Mono has at least, one advantage over Java. And that is C, C++, Python, Perl, Ruby, Java, C#, and even VB developers, fanatics and enthusiasts can write applications in their favorite or preferred language. ”
Your premise that one can use any language for .Net does not hold water. Second is that a language sometimes is much more than a syntax, and that’s why some have to be crippled in order to run on .Net. Third is that if you don’t love any language besides the mainstream ones you haven’t loved that much. Enough said
Mono has at least, one advantage over Java. And that is C, C++, Python, Perl, Ruby, Java, C#, and even VB developers, fanatics and enthusiasts can write applications in their favorite or preferred language.
So you say I can use all my favourite Perl, Python and C++ libraries (ie. the STL) and use them in C#?
But even if you could, this “advantage” is none, since if you want to programme portable code, you have to create a 100% .NET application, ie. just using calls to the .NET framework.
Your “advantage” of using different languages goes only so far to support the language syntax, nothing else. I doubt anybody really cares that .NET supports the syntax of the Java language, without it’s framework (and the same goes for all other languages).
Even if Microsoft begins to act as we expect them to, all is not lost. We could always discard the Windows related APIs in .NET as stick the Unix related APIs which Mono already has.
So you mean that if Microsoft wishes so, we end up in a diversity platform-incompatible .NET implementations (at least Microsoft, Mono and dotGNU)?
Okay you probably would be able to create portable, simple non-GUI applications, but I doubt there will be much need for them.
I don’t say Java is any better in this respect. But I say .NET is definitely not better either!
I started programming when there was no ‘free’ C-compiler or even a free OS (back in 1987). I didn’t care much. Why? There were plenty of C-compilers out there and I knew, if I was not satisfied with one, I can choose another. Even GCC was announced that year, so I knew that I will have the possiblity of using a free implementation in the future.
What matters are open standards that allow you to create your own free implementation of it. ANSI C and C++ is an example of that. OpenStep is one. POSIX is another one (just if you want to be ‘certified POSIX compatible’ you have to pay).
Microsoft .NET is … partly. It’s a ‘open’ standard, but the most interesting parts are left out, ie. you are not guaranteed that you can implement them freely (forever).
I know… it’s not full of funky syntax and the very word “Basic” burns, but… for a general purpose, easy to program, easy to maintain, with native controls (now) in 3 major platforms (OSX, Windows, Linux).
There are some major issues with certain areas of the language, I certainly won’t lie to you, however, to get a project done quickly, with few, if any bugs, REALbasic (http://www.realsoftware.com) is quite capable.
The language both procedural and oo types of coding, is flexible, and is quicker than most java apps that I’ve seen. Unfortunately, I don’t have the time right now to go on in length about the language, but I think, before just pooh-poohing the word “Basic” in it, you should go check it out!
Portability: it is apparently not too hard to recompile for MacOS X (GNUMail and GWorkspace can be compiled for either GNUstep or MacOS X, for instance). Also, there is a port to Win32 in progress—the foundation stuff is in the alpha/early beta stages, but the GUI kit requires quite a bit more work.
The port of GNUstep foundation for Win32 is stable. It’s been used by several companies for production (and for quite a while now). The only unstable part is AppKit for Windows, and a native port (using e.g. GDI) is still not available.
So non-GUI apps work fine on windows, but if you want to use GUI on Windows, you have to implement it yourself (e.g. using the Win32 API directly).
As for whether GNUstep will eventually catch up with the popularity of Mono, GLib/GTK/Gnome and QT/KDE, I don’t know. I surely hope so, since it’s a very nice API, but since there are not many GNUstep apps, nobody is really interested to develop for it. And since there are not many GNUstep app developers, there are not really many GNUstep apps. The chicken and egg problem.
Mono, Gnome and KDE got around of this problem because of:
– good Marketing
– hype
– the simple need for it
Unfortunately all three points don’t apply to GNUstep (anymore). My hope is that some free MacOS X applications – some which people would love to see on Linux – are being ported to GNUstep. This would really attract users and developers to GNUstep.
dumdidei:
I agree. Templates and the STL way of doing things are *very* powerfull. But also very difficult to learn to use correctly. It’s taken me around a year to learn to code C++ properly. I’d wager that most C++ coders don’t code C++ well.
As an aside, I’ve found that the biggest hurdle to using C++ correctly is the idea of OO programming. The great strength of C++ is Generic programming (templates) in my opinion. In many ways, Generic programming is incompatible with classic OO ideas. For instance, in classic OO you usually specialise with inhieratence. You end up with large object hierachies and a lot of indirection. This is both a maintanence and performance nightmare. In C++, specialisation via templates is much prefered, but is not intuitive if you are taught classic OO. Another idea in classic OO is encasulation. You have an object with some data, and a bunch of methods attached to that object. The way to do this with C++ is to have your data and algorithms in *separate* objects, where the algorithms are generic (if possible). So you end up with a weird cross between OO and classic procedural programing. STL strongly favours composition of object rather than relation by inhieritance. This concept is not taught well.
@blahblah
Probably the biggest problem with C++ is a lack of good coding guidlines and methedoligy. Also, people really should use public C++ libraries like boost. I agree that C++ is really bad in the hands of inexerienced coders. This is probably largly dut to the fact that everyone wants to program C++ in the same way as C# or Java programming is done. The MFC is also an old school OO style library (used in most Windows programming). However, the new C++ coding practise is extremly powerfull. After finally learning it, I’m very very impressed. Maybe I’ll write a modern C++ tutorial sometime, although I’d still like some more experience. For instance, I’m still unsure of what the best way to use exceptions are. Exceptions seem to be used *very* sparingly in modern C++ libraries.
M.Grabert
The point of Mono, .NET and Java is to create a managed environment. If the GNOME community eventually decide to embrace the Mono managed framework, all GNOME base installations will include Mono, which consists of various APIs, the virtual manager or CLR as they call it, the various supported languages or their syntax etc.
If you decide to write your application via Mono in Python, then of course, it is obvious your application is going to be managed by Mono. The good thing about it is that you aren’t forced to learn a new syntax or even a new language. You write in whatever language you are comfortable in, and the the Mono runtime takes care of the rest for you. As opposed to what in Java? Absolutely nothing. To use Java, I have to know Java. To use Mono, I just have to know the APIs I’m interested in. I don’t necessarily have to learn a new language or syntax as you put it.
On the other issue, if Microsoft decides that the Windows specific APIs of .NET shouldn’t be used by Mono. Then, developers have a better reason to use the more portable, non-Windows specific APIs, most of which work on Windows already by the way. The non-Windows APIs can do almost all what the Windows APIs can do, and sometimes do more. It’s not a loss for OSS developers or GNOME in particular. It only means developers who adopt Mono, will be writing portable code as opposed to Windows specific code. Oh, and the managed framework will be free and GPL compatible. A good thing in my opinion. Don’t we long for the day we can use an application on Windows, Unix and other platforms with almost no code rewrites?
The parts of .NET that are open standards have been, or are being, implemented by Mono. Mono further extends this implementation by adding other relevant APIs already existing in the Unix/Linux sphere. It is not a crime to write an open source version of a closed sourced API, application, driver or library the last time I checked. For the Windows specific aspects of .NET, such as Windows forms, Mono provides an open source version which is packaged separately, just in case Microsoft to enforce their patents over it.
Eventually, the goal of Mono will be to drive market share away from .NET to Mono. When developers know they have the option of writing portable code at a lower cost on Mono than on .NET or Java, and with no licensing restrictions, it’s a no-brainer they will be more likely to use Mono and non-Windows specific APIs if they could. I see Mono being compatible with .NET, but it will offer a lot more cross platform APIs than .NET does in the future. In fact, if things go as planned a point will come where there will be no reason to use .NET when you can use portable, open, free Mono. Well, except Longhorn is radically different from anything we have ever conceived and writing code for Longhorn means your code will never be portable.
Finally, open source adjust relatively quickly to API changes and breakages. Proprietary and closed source environments don’t. All this talk about Microsoft changing .NET’s APIs is just silly. Even if they want to, they can’t. It is just too suicidal. Mono doesn’t exist primarily to please closed source vendors or for business oriented motives. It exist bring easy and rapid application development to Free Unix like systems first and fore most before anything else. Any other motive is just a side effect, bonus or compromise. The question is, do GNOME developers want a free, easy to used, multipurpose, portable, rapid application development framework or not?
Well, I know for all we all want one. It could have been Java, but Mono presents just too many advantages over Java especially with regards to GNOME. I think almost all the GNOME APIs are present in Mono, GTK#. As far as I know, Java has none, although I haven’t been keeping track of the activities on the Java-Gnome project. My point is, even if Microsoft enforces their patents, Mono is still useful and we could build from there.
Why not re-create a new version of C++ with modern JAVA/.NET like features?
It is that difficult?
I´m only asking, no trolling attempt here
I agree with you to a certain extent, and do think that C++ is a much more powerful language than most people give it credit for. However, I think its starting to show its limitations. Take, for example, the generic algorithms. They’re basically begging for lambdas! Sure, boost does lambdas (kinda), but they’ve got a weird syntax, closures are a PITA to use, and they make understanding compiler errors nearly impossible. Template metaprogramming is nice (especially if the metafunction proposal makes it into C++ 0x), but its much more complex, and much less powerful, than proper macros. The C++ syntax has become complex to the point where only a few parsers exist that are able to handle it correctly. In all, I like C++ for what it is, but I don’t think it can be extended cleanly to handle what the C++ community wants it to do.
people,
when you says “Java”,
it would be great if you can give some hints
that you talking about
– “programming language” or
– “platform” or
– both.
since in this context (discussion in the article),
it is very important
for instance,
using Java programming language without JVM is feasible.
so if you put some comments about
“What not use Java programming language instead of XXX?”
people who going to comments your opinion later
will not going to talking something like
.. “but JVM is slow” or so.
(it may be true, but it is not related to your opinion).
just my 2p
So, my thought after reading this was, why not Lisp? I have programmed for many years in C, C++, and Java, not to mention things like BASIC, Forth, Fortran, etc. I recently (last 6 months) have gained a huge appreciation for Lisp, specifically Common Lisp. Over the years, I have seen other languages trying to add all sorts of extensions that mimic what CL has had for years (GC, AOP, lambda functions, etc., being added to Java, Python, etc.). Yes, yes, I know that the parenthesis seem horrible at first. They aren’t. Any editor worth anything (i.e. anything better than Windows notepad) deals with Lisp code easily and the parens just sort of fade away when you’re writing.
In short, while I’m not a huge Richard Stallman fan, I think he nailed this when he designed emacs. Simply put, Lisp is the right way to go for applications programming.
Why not re-create a new version of C++ with modern JAVA/.NET like features?
It is that difficult?
I´m only asking, no trolling attempt here
The problem with C++ is not that it has no “modern” features. In fact, in the area of Generic programming Java and C# are just catching up to C++. Of course, there are other modern features that are really cool such as automatic garbage collection and lambda (anonymous) functions.
There is work being done on a *new* C++ standard. The “new C++” may or may not have some of these new features. If you are interested check out
http://www.cuj.com/documents/s=7986/cujcexp2002sutter/
as a starting point. Or do a search for C++0x on google.
you all are quarelling about java is something, c# is sth or c++ is sth. noone deals with us his real experience. it’s all about politics. i saw only few people who really see the point.
i know people who develop windows apps. one of them is one of major programmers of game “Chrome”, maybe someone now. he laughs at linux and always gives the same reason, there is no Visual Studio for linux. there is no really good IDE, which contains good editor and good API docs browser, which don’t hang up (is really stable). i recently wanted to import my project to new KDevelop 3.0 (MDK 10.0). and what happend, when i load source file and choose doc tab, kdevelop hang up. this should be IDE? my other friend, also good programmer, said me today that he’s friend works with kdevelop-group. he said him that kdevelop is full of junk code.
other thing is good API docs. not only function name and parameter names. it should contain function effect and maybe an example.
and at the end… why so many good projects die (like GNUstep)? we should answer this question?
“As for whether GNUstep will eventually catch up with the popularity of Mono, GLib/GTK/Gnome and QT/KDE, I don’t know. I surely hope so, since it’s a very nice API, but since there are not many GNUstep apps, nobody is really interested to develop for it. And since there are not many GNUstep app developers, there are not really many GNUstep apps. The chicken and egg problem. ”
Former NextStep programmers, or present day Apple programmers could cross over fairly easily.
“Unfortunately all three points don’t apply to GNUstep (anymore). My hope is that some free MacOS X applications – some which people would love to see on Linux – are being ported to GNUstep. This would really attract users and developers to GNUstep.”
Maybe bring Cocoa over? Cross-platform across x86 and G4/5
[A.K.H. ]
“For instance, in classic OO you usually specialise with inhieratence. You end up with large object hierachies and a lot of indirection. This is both a maintanence and performance nightmare.”
It’s not as bad as you think.
[ root]
“The question is, do GNOME developers want a free, easy to used, multipurpose, portable, rapid application development framework or not? ”
That’s not the question. The question is Mono the one? As noted by the replies, there is more than one language/framework that will satisfy the criteria. And sadly while we may not like “laws” intruding into the decision. SCO has robbed us of that luxury.
@LinuxBuddy: In my dreams. Some form of Lisp is probably the ideal solution here. Native Lisp compilers are nearly as fast as C (for practical apps, not just tiny inner loops that the JIT can compile once and leave alone). Its much more powerful than any of the languages under consideration. Most CLs have a good FFI for accessing C code. Its also very mature, standardized (R5RS Scheme and ANSI CL), and has lots of open implementations.
However, there are some practical problems. The parens, though liked by people who actually know the language, are hard to market. Dylan is a more marketable Lisp, but the Gwydion implementation isn’t mature enough yet. Bindings are a problem. There are no Qt bindings to any Lisp, and Dylan and CL have incomplete GTK+ bindings. SBCL/CMUCL also need a bit of love — the code generator is pretty antiquated. A pretty graphical IDE would also be a big help. Sometime that preserves the productivity of Emacs + ILisp, while at the same time having pretty icons and graphics.
If just half of the work that goes into Mono would go into massaging SBCL (or Gwydion and making some good KDE and GNOME bindings, OSS would have a phenomenally powerful, yet completely unmarketable platform on its hands
I totally agree with you about C++’s limitations. Generic programming really does beg for true lambda functions. And template errors are so useless.
Perhaps C# 2.0 has promise here? It has true generics (unlike Java’s generics which lack any of the performance benifits Generics can provide) as well as lambda functions (called anonymous functions in C# terminology). Of course, I’m not sure that C# has a good generics based library like the STL. And not having used it in practise, I have no idea if C# compilers will produce good errors or not. It’s a langauge to watch though. Supposedly C# 2.0 will also be ECMA standardised which should allow mono to implement it. This is a must, since programming on UNIX is a must for many people.
1: cough..joking..cough
2: everything runs on JVM. python,ruby and at least 10 more languages
It’s not as bad as you think.
I’ve used both methods with C++. I’m designing a library for some academic work, and first did a proper OO implementation without templates. It took a long time and I spent most of the time just writing boring specification type code. Define this accessor, this adapter, this strategy pattern, etc etc.
After I become more experienced with C++ templates and the STL way of doing things, I decided that the best way to make my library take advantage of the existing STL was to make it templated and use the same concepts. I rewrote a small part of the library in the STL way of things. It was MUCH smaller (and therefore easier to maintain) as well as MUCH more powerful because it enabled me to take advantage of existing algorithms and code from the STL. This is the point of generic algorithms, so you don’t have to write new ones for new objects.
I’m not suggesting that OO stuff in general is terrible. But C++ OO is no where near as nice as Java or C# OO due to syntax and things like pointers vs. references. I’m also suggesting that using composition + generic programming (ie design patterns + templates) can be much *more* powerfull than traditional OO.
Don’t knock it till you try it.
“””The parens, though liked by people who actually know the language, are hard to market.”””
Yeah, really. Most people’s objections to lisp seem to be to the parens (that and they are bothered by lisp-2 and case insensitivity).
What’s really needed is either a cl<->java link (something better than jacol or whatever it’s called) or a version of CL that compiles directly into bytecode (something better than armedbear).
Incredibly, I failed to mention the most important point. There are very unique desktop applications already written for GNOME in Mono. The developers of these applications praised Mono to no extent. Now, where are the Java-Gnome apps?
I find Muine, a GNOME music player written in Mono, interesting.
http://muine.gooeylinux.org/
Anybody know if kde will be supporting mono at all???
Yes, I think we’re on the same page. I have seen your posts on comp.lang.lisp.
If just half of the work that goes into Mono would go into massaging SBCL (or Gwydion and making some good KDE and GNOME bindings, OSS would have a phenomenally powerful, yet completely unmarketable platform on its hands
Exactly! I have been thinking about exactly this. I have been playing around with UFFI lately and am thinking about perhaps doing some GTK+ bindings for SBCL. The code generator also needs some work, but that can come over time. Anything that you could build in Python will already be faster in SBCL by a long shot. I really think this could be a killer platform.
Now that I have really found Lisp, I keep wanting to shake people and say, “Just get over the parenthesis!!! It’s no big deal!!” 😉
Incredibly, I failed to mention the most important point. There are very unique desktop applications already written for GNOME in Mono. The developers of these applications praised Mono to no extent. Now, where are the Java-Gnome apps?
So what? Mono = C# = Java. This is not a language issue. The fact that Miguel lost his mind and decided to do something around C# doesn’t mean that Java wouldn’t be a better choice. IMHO, if I had to pick, go with Java as I find Sun far more in the OSS camp than Microsoft. If Miguel spent his time writing a JVM rather than the CLR, the world would be a better place.
I agree with your views too. I mentioned that I do not really like the C++ syntax too . Basically, my point was that Java or C# do not offer much of an advantage. In fact, I think, that out of the “imperative” programming language camp, no language offers enough of an advantage that warrants abandoning the enormous amount of C++ code out there. I really am confident that most of the deficiencies C++ has can be overcome. Via the official process, this would of course take very long, if doable. But implementing a “better” syntax is comparably easy. Mark Mitchell and a few other guys of CodeSourcery LLC did a very compliant C++ parser (for GCC) alone over some month, so implementing a parser for the SPECS syntax I provided a link for should not be that much of a problem.
I even maintain a estimation that it would be technically feasible of introducing functional elements, like lambdas into C++. One way is obvious, compiling C++ to bytecode and run the whole program on a VM. Another way would be some hybrid model: Compiling parts of the program into native code and storing lambda expressions verbatim in some object file. This way the resulting binary can be executed without starting a VM directly. Only when program execution reaches a point where lambda expressions are evaluated, a VM can be fired up on demand.
Topics Id like to address
“Corel in the late 90′ completely failed in (re)writing an office suite in Java. Learn the lesson. ”
I’ve seen the Corel building, and they do not compare to the OpenSource community.
Not only are the limited by their numbers, but are souly fiscal.
Personally I feel that we should not be relient on making code compatibility with *nix’s (including Mac OS), since we have a opensource community , they could do it for them selves. The focus should be on getting it to work for linux.
This I feel, and I think Microsoft would aggree with me, is a threat to them. With Linux being regarded as a server platform, and soon to be regarded as a desktop platform.
This is why its so critical that we dont let Microsoft bambuzzle us. They want us out, more than any other OS. (Look at there new add campaign, it speeks for itself).
What also makes us a threat is the number of contributers, they cant compete with that, and know that.
The fact that Linux supports so many architectures, CPU’s etc. makes us a threat again.
Mac didnt do that… they decided to stick to propreitart hardware.
In of all these things linux, opensource and linux distrobutions are winners.
The thing is, we shouldnt be afraid of change… “hey guess what , the plane really did fly” Is what people probably said after hearing of the Brothers first flight.
Linux, and I speak from my experience, has develope into a
OS(incld distro ware) that looks and works great.
Beat your opponent, study him, know his moves, what their afraid of , what you find out is your strength.
Windows:
Strenghts; Money
Talented Programmers
Lawyers
Patents
Strict Hierarchy
(add more if you want)
Weakness; Money
Virus
File system
Bug Fix
Fear “ther afraid of linux, OpenSource”
Strict Hierarchy (new ideas may not be heard)
Weak file system
Linux;
Strength; OpenSource
Worldwide acceptance
Free help
Hardware compatibility (architectures, cpu, etc)
Hardware manufacturers seeing a future and
providing compatibility, drivers etc.
(Shuttle,NVidia etc)
Companies seeing Opensource as future(Novel etc)
Upgrading every six months an less.
The best file systems
The best programming talent
Pricing, even if you pay for it, its still “free”
The ability to not follow suit, and be heard.
(add more)
Organization (United Linux)
weakness desktop
windowing
new hardware support
Microsoft is fiscaly driven, to provide substance where none is needed, to keep the money coming.
I feel the future of linux, opensource programming is a very relevent topic, we should be having a wiki page to discuss this to a resulution.
All the greatest and the unheard should be invited.
PS: I want to learn to fly!
I even maintain a estimation that it would be technically feasible of introducing functional elements, like lambdas into C++.
Does anybody else find this funny? As somebody who loves C, used to program in C++ for quite a while and now finds it absolutely repulsive, I have to laugh at this. So we take C (fairly clean and simple) and then we add objects. That results in all sorts of complex syntax. Then we add templates to get some semblance of a real macro capability. Only it’s really complex and still sux. Then we contemplate adding something like lambdas. Yikes!
So when all is said and done, we evolve to where Lisp was at decades ago, only the features are poor and the syntax is far worse than Lisp’s parenthesis.
Guys, if you really want all this stuff, just start using Lisp. It’s here today.
Linuxbuddy’s response:So what? Mono = C# = Java. This is not a language issue. The fact that Miguel lost his mind and decided to do something around C# doesn’t mean that Java wouldn’t be a better choice. IMHO, if I had to pick, go with Java as I find Sun far more in the OSS camp than Microsoft. If Miguel spent his time writing a JVM rather than the CLR, the world would be a better place.
Mono is not C#, neither is it Java. Please read up more information on them before jumping into stray conclusions. Also, Java is neither free software nor GPL compatible. For it to be included in GNOME it has to be free software or GPL compatible.
Lastly, if Java was a potential development framework for GNOME, there should be at least one application that demonstrates its strenght and differentiates it from other frameworks. There at least four GNOME/Mono applications I can list off the top of my head. Unfortunately, I don’t know of any GNOME applications written in Java.
My conclusion: I think a lot more GNOME developers are embracing Mono as the prefered managed and rapid application development environment as opposed to Java. Personally, I prefer Mono, because as we speak today, I can write a full functional Gnome application based on Mono, and Mono is free software. I’m not sure I can say the same for Java.
I haven’t read all the previous comments but I kind of get the gist of where people are going. (the wrong way usually) The problem is that Gtk+ or Gnome (or something), kind of need a way to be able to provide components that are not native, as if they were.
Gtk+ provides all these wonderful widgets written in C. However it doesn’t provide widgets written in Java or C# or Python or whatever. It would be nice if the toolkits could standardize on a api for linking to “managed”/scripted/vm style components. I assume Longhorn plans to do this by doing everything with CLR which gets around language independence by having a common compile target.
So the question is. If the Open source community wants to go this way. Do we want to stick with a core of C/C++, and provide wrappers for every other language/VM or define a common binary format and compile everything into it.
I have no idea if the former approach is even practical. (Currently you would probably try and create Bonobo components for encapsulating indivual objects). The latter (assuming non-native binaries) has serious advantages in terms of manageability, introspection and cross platform binaries, however all the work is then pushed to the creators of the compilers.
I think now is the definitely the time to be thinking about this kind of thing though. I think the future of programming is diverse languages, but hopefully without a lot of the complicated glue that exists currently.
It should be noted that lambdas don’t really have a runtime cost. They are usually evaluated at compile-time, and emitted just as another function. Incorporating lambda (or some form of it) into C++ wouldn’t be very problematic.
However, that does bring up another point. If you want *real* lambda, with closures, you can’t implement it efficiently in C++. Closures are conceptually heap allocated. However, most compilers will perform an optimization to stack-allocate closures in most cases. Since C++ makes an explicit distinction between what is stack and what is heap allocated, you couldn’t perform that optimization.
There was a project called Qt# that tried to give portable.net and Mono qt bindings. It’s still up at sourceforge but development is all but dead. The problem is c++ and virtual functions, and how to deal with them. Not only that, but it’s trivial to call a c function from a c based shared library in c#, but if the library is in c++ then you have to wrap up everything into a c library. It would be nice to have KDE bindings for mono, but I don’t think KDE developers are very interested.
Actually, GTK+ provides bindings for all the languages you mentioned. GNOME is pretty much language agnostic. What I wish we could avoid is language bias. I personally, don’t like C++. I don’t care if if it possesses the capability of changing stone to gold or water to whine, I have just grown to hate.
Many other people have similar feelings towards other languages. For this reason, developers should be provided a platform that is language agnostic, yet irrespective of the language one uses the underlying APIs should be completely accessible to the developer.
The bone of contention is which higher level development platform GNOME should adopt in preparation for the future. Unfortunately, the comment section seems to have turned into a toolkit or language flame fest. Which is silly, in my opinion.
Thanks for the information. Ya I’ve checked that
sourceforge project site a few times and it definitely
appears to be pretty much dead. There are a few other
projects going to try and allow mono to run independently
of which either gnome and kde.
The problem is so far it seems that the gtk# interface
is by far the furthest along. I’m not looking to write
any enterprise level applications yet on linux but I
did want to try the gui part of mono out especially
monodevelop. Unfortunately the version of linux I
am using doesnt actually have the full gnome apis
installed. At first I didnt mind this but now that
i really want to try monodevelop its made me a bit
annoyed. So I was trying to find another solution
besides having to somehow install gnome and get it
to work with my distro.
From my understanding gtk is written in c so I guess it was easier for them to write the connections from c# to c as opposed to the gtk api which is written in c++? I think you can use dllimport within c# however I dont think thats very useful for gui applications.
I agree. The argument is really about do we want to continue with bindings and wrappers, vs a common format.
The argument for a common format is so that I can use and reuse components written in any langauge in any other language without needing to create bindings, wrappers interfaces or other glue. I could even write a frontend gui for the new pluggble file selector in oCaml, Perl, XUL, XAML or whatever. Something that I’m fairly sure I can’t do currently. (or at least not without layers of glue)
The idea is really not to go for one programming language, the idea is to find a way to support them all.
The approach suggested is to use the runtime environments of Mono or Java to achieve this. However the article also suggested that scripted langauges like Python would be embedded which just re-creates the current problems of bindings and glue to my mind, although embedded scripting languages are very useful.
You might also want to check out dotGNU. They have an implementation of Windows Forms that runs on top of X on unixes and GDI on windows. It should be possible to run it on mono too by swapping out some assemblies. It’s going to look like crap on any platform you run it on but it is another gui option. Also, check out xwWidgets.NET. It’s pretty feature complete and will look native. The only problem I have with it it doesn’t use delegates/events for it’s callback mechanism. It still uses some MFC’ish type implementation(maybe that has changed, I haven’t checked it out in a while). Yeah, Monodevelop is dependency hell, and unfortunately it won’t run on windows which would be nice because then you have a copy of VS.NET open to see what useful features could be added.
Hi
Mono develop is something like a clone of sharp develop for windows so you might want to check that out
regards
Jess
[i]The approach suggested is to use the runtime environments of Mono or Java to achieve this. However the article also suggested that scripted langauges like Python would be embedded which just re-creates the current problems of bindings and glue to my mind, although embedded scripting languages are very useful.[i]
The reason that I believe Mono is a good solotion is that it provides a common language interface. C#/Java/Python/Perl could all be used to write any application, while they all stand on the same ground. Here’s a great quote from the http://go-mono.com
“if you define a class to do algebraic manipulation in C#, that class can be reused from any other language that supports the CLI. You could create a class in C#, subclass it in C++ and instantiate it in an Eiffel program.”
For that reason Mono has the possibility to open lots of doors. It allows people to use their language of choice with a common API towards one goal.
Here’s a really good response to HP’s article, with Mono in mind of course. http://www.advogato.org/person/lupus/diary.html?start=10
The thing is, its hard to agree to a common format. C-like languages have certain requirements, while other languages have other requirements.
Consider the implementation of generic dispatch:
C++/Java/C# have mono-dispatch. They do dispatch via a virtual table per class, with a v-ptr in each object. Lisps have multi-dispatch. Optimally, they do dispatch via compressed dispatch tables, one per generic method.
Or the implementation of exceptions:
C++ (well, gcc) uses a table-based method. When an exception is thrown, a table is searched for handler code. CL/Dylan (well, Gwydion, SBCL) use setjmp() and longjmp(). Scheme uses general continuations.
Or the implementation of classes:
C++ uses a direct pointer to a bag of bytes. Java/C# use a direct pointer to an opaque, structured record. CL (usually) uses a pointer to a pointer (because classes can change at runtime). Some languages (ML, Lisp) will play optimizer tricks where objects get stored directly in the pointer (with some tag-id bits), while other languages (C#/Java/C++) do not.
How do you reconcile all of these things? You either force a particular implementation model (like .NET does) that’s sub-optimal for many languages, or you have a “standard” that is the union of all those disparate models.
From what ive seen dotGnu doesnt seem mature enough to write a full blown application using it. I am incorrect in this statement? I’ll check out wxwidgets.net though. Thanks.
Looks interesting. Anybody here use it under kde at all?
I think my intended definition of a Common Format is something like Java bytecode or CLR. Each language uses a different compiler to produce this common format. That way it doesn’t matter how these languages currently implement stuff, only how represent that in the common format.
This would be the big hurdle, in that every language would need a compiler that produces this common format.
And thats what I thought this article was about. Do we want a common format, would we use one of the existing common formats or develop yet another one, or just reject the whole idea out of hand.
I was trying to clarify what I thought the article was really about, if only to myself.
I do not understand why Pennington insists that an open source implementation of the JVM is a necessary condition for Java to flourish as a development standard.
Open source and open standards both solve similar problems. Unlike C#/.NET, Java (language & platform) is a complete open standard. Implementations of that standard need not necessarily be open source for open source projects to target this platform.
I would compare .Net to ADA, in that ADA had been used by the US to slow down technologically the URRS.
De we really need 30 languages in one runtime environment, or only one would suffice ? I know there are a bunch of people here and everywhere that say that you can run whatever language on .Net, even though they really want everyone to use C# and be done with it.
The problem is that we will never ever settle on one language/platform.
GNOME and GTK+ already exist in a good state. Fork it ! That will happen eventually anyway. Actually, GNOME is becoming kind of irrelevant for me. It never works. GTK+ on the other hand is pretty cool.
That’s the thing. JVM bytecode and the CLR make all sorts of assumptions about how objects are represented. That’s the whole reason you can take a C++ class and extend it in C#. However, those assumptions are very non-optimal for languages that don’t look like C#/Java.
Consider, how would you sub-class a C# class in Lisp? C# sub-classes by making a new v-table that includes all the old methods, plus the new ones. A v-table doesn’t even make sense for a Lisp implementation, where methods don’t belong to classes. There is no common implementation that doesn’t compromise either C# or Lisp.
Okay I get it. (I think)
I guess that is what the discussion needs to be about. Where are we heading, and why. It would be nice if they were also thinking about whatever will be the next generation of programming languages (assuming there ever is one).
I think the whole advent of C#/Java was a compromise between existing languages to give them the fuctionality they wanted. And then they compromised some more (ala native types in java). My knowlege of C# is minor, but I assume they’ve done similar things.
Gee I wish things were simple, just once.
The built-in database access classes, the security architecture, the networking classes, the standard API for XML parsing, the garbage collection.
Oh wait, C++ DOESN’T HAVE ANY OF THESE
yet people advocate it for application development
“He doesn’t talk about kde,…”
He’s a Redhat employee. The distro’s need something to distinguish themselves. I like that Redhat focuses on GNOME and SuSE on KDE (at least so far). It leaves a real difference and keeps the competition alive.
A search on the author lead me to
http://groupware.openoffice.org/glow/
Interesting development. The first sprout for a full blown desktop in Java? Why not earlier? It would always be playing on the other team’s turf (not so bad in soccer). Now it has it’s own turf (Linux). And doesn’t need to worry about the other team ever coming over.
Why does everything need to be built into the language? Aside from the security stuff, C++ has libraries that provide all of those features.
stick to java people. Look at the improvement that has been occuring.
I am newbie to linux world and really wonder why is mono(if I knw correctly it’s a sdk type similar to .net from Microsoft)
is important. Is it that MS can make any thing as a standard and let others suffer? I mean today they can create CLR and other stuff and minimize difference between apps and web based services and they can do something like that with other stuff tomorrow. So is it that they do not need to adhere to internet standards or there are no rules that can force MS to stop this or atleast make it a standard so that other OS can use it too
stick to java people. Look at the improvement that has been occuring.
Java is goig nowhere !
Look at Java3D games, here a car racing game in Java : http://www.agency9.com/games.php
Don’t you read the news guys : Java is slow on desktop !
Look at this : http://www.wurmonline.com/ Wow what are these people thinking… using openGL 1.4 with Java… C’mon, try to make Java work on serverside first !
Damn a just found a cool RPG out there that I can run on my old PII400mhz. That could be nothing else but good old C++ :
http://www.abandonedcastle.com
Wake up! Java is so slow, I could not even play pacman with that !
Running GTK on Java, it’s impossible !
Look at the major failure project Eclipse : http://www.eclipse.org
Using native widgets with SWT instead of Swing is the worst thing for performance I’ve ever heard. “Multi-platform” and “Native look’n feel” are just marketing buzz-words.
People are crazy about Java… they are thinking about putting it everywhere. But one thing is for sure, for it’s too slow for a pentium 4, I will never see Java games on my cell phone !
Nicolas 😉
Wow the language wars never stop.
Well. A couple notes. You can of course compile Java with GCJ as the article stated. It still isn’t the fastest thing in the world when you start writing big applications. There are a number of reasons for this. Part of it is simply due to the overhead of the garbage collector.
In fact, much of the slowness you see in Java is actually due to the garbage collector eating up so much system memory. Another part is that it tends to run its mark and sweep all at once which really impacts large interactive applications.
Now there are other serious Java performance issues related to the complete lack of structs. .NET actually has bytecode support for them which is a big plus in its favor.
That said, contrary to what people have been writing, C++ really is the most widely used language for the popular commercial desktop applications. Microsoft supports it through MFC and Apple supports it through Carbon. There are *a lot* of MFC and Carbon applications. It may not be the most widely used for *business* software, but we are talking about mostly consumer applications here. Businesses are still free to implement things in Java if they wish and take the performance hit. The question is do you really want to take the performance hit on everyone else’s computer.
I imagine the best solution is to have a common toolkit and an interface to it from each language just like what we do right now. Don’t bother reimplementing anything, but if someone wants to write a new application in C# or Java, support it.
I do not have your insight into implementation strategies for functional (or imperative, for that matter) programming languages. However stack and heap are abstractions too, after all. There is the “as-if” rule which you probably know. So I tend to think that the same kind of optimisations are possible for C++ too. I could be wrong with that.
Yes, it is true that the CLR favors vtable-based OO. But if you are willing to use unsafe code you can use all the other implementation concepts as well. For example the lambdas in F# can be implemented CLS-compliant as delegates (slow) or unsafe as function pointers (fast). There is a simple compiler switch for that.
For applications it would be acceptable to use unsafe code, since you still have process boundaries to protect you. For applets or plugins that live in other applications you can live with the inefficiency of delegates, and you get verifiable code.
So it is possible to write fast functional code for the CLR. You just have to live with unsafe code.
I’d really suggest reading over the following articles/postings to get a _real_ sense of the Mono side of things.
A direct response to HP’s article:
http://www.advogato.org/person/lupus/diary.html?start=10
A legal overview of why Mono/Java/etc are all _possible_ legal problems waiting to happen:
http://lists.ximian.com/archives/public/mono-list/2004-March/019048…
Using Java inside of the Mono framework:
http://primates.ximian.com/~miguel/texts/gtkjava.html