Linked by Eugenia Loli on Mon 19th Sep 2005 17:02 UTC, submitted by Eli M. Dow
Mono Project Build applications for Linux while maintaining cross-platform capabilities using .NET languages.
Thread beginning with comment 33901
To read all comments associated with this story, please click here.
Managed Code is what we need
by on Tue 20th Sep 2005 11:19 UTC

Member since:

Look at all those problems which raise with pointers, malloc and other (mainly C/C++-specific) problems which raise with unmanaged code: buffer over/underflows, weak casting and other bad things which lead to security leaks. Managing the memory manually is a very heavy duty task and no single application (maybe except hello-world-alikes) never somewhere suffered from writing to wrong parts of the memory.

Even best programmers run into problems with memory and code management. Of course, Mono/Java cannot make the code 100% secure against abuses, but it reduces the amount of code you have to maintain to somewhere under 50% of the original C code by taking away memory and code management. I ran into situations where the GC could not get rid of a variable because it thought that it was still referenced - no code is perfect. Manually nilling it helps - but such a situation is very rare compared to random segmentation faults you run into with C or C++ just because the data was of wrong type.

Yes, you cannot replace essential things with managed code. Writing a kernel in c# or java is hardly possible, but if the runtime environment (here I mean mono or java) allows accessing the kernel, then you can do anything you wanted to do low-lvl. Yes, for every task only best suitable tool should be used - and in a lot of cases C isn't the suitable language anymore. Sorry, but you can write to block devices even with brainfuck/fuckfuck, but I doubt you'll do that.

It is the point we should achieve: move the majority of code to managed runtimes and in my eyes to you make more sense to let the kernel, the RE, xorg stay as they are and move everything else [you can] to Mono or Java. That will raise code quality rapidly.

But that means that 96% of the code will have to be rewritten. But hey, a lot of code had to be rewritten from COBOL and Fortral once upon a time, too.

This is the race and Microsoft does everything wrong it can: win32-winforms-avalon - 3 API changes in only several years. That's why .NET hasn't been adopted until now [except by ATI and HP]. The one who manages to move the majority of the code base from unmanaged to managed will rule upcoming 20 years of IT.

And yes, while Java is a very consistent development environment, it is not usable for such a task. GCJ exists with a lot of ambition and GCC is in unmanaged (GCJ has a GC) world is what .NET is in managed. It is a good move from mono's side to support java. And I hope that they will do that good.

Sorry, folks - it still seems that here are unmanaged advocates here who just tell "who can't maintain the memory, he shouldn't begin programming". We are humans and we won't manage memory as the computer does, so let the runtime environment do the job and return back to the UNIX roots: do one job, but do it good (and until now C programming meant two jobs: your task and managing all possible failures)

Reply Score: 1

RE: Managed Code is what we need
by on Tue 20th Sep 2005 12:50 in reply to "Managed Code is what we need"
Member since:

I agree completely about the technical merits of .net/mono, and how nessicary it is that we get a managed language as a core platform for gnome.

Where i disagree starts here

"And yes, while Java is a very consistent development environment, it is not usable for such a task. GCJ exists with a lot of ambition and GCC is in unmanaged (GCJ has a GC) world is what .NET is in managed. It is a good move from mono's side to support java. And I hope that they will do that good. "

Java as a platform is far more mature and complete, it will take .net years to get to the point that java is at already. There is huge amounts of open java development out there already (check out the jakarta project, or spend some time on sf.net), java is made by a company that is far more open source friendly, and doesnt have a long history of dirty pool that microsoft is famous for.

The big problem with desktop java isnt even java, its swing. Swing, while being a fantastic toolkit, is insanely easy to misuse. What you get is an extremely unresponsive and ugly application. But if java were the new gnome platform, we wouldnt be talking swing, we would be talking something like Java-Gnome, the GTK bindings for java, in which case you would expect the same responsivness as a Gtk# app. If you dont believe me, look for benchmarks. The argument isnt weather java is slow or not, its weather its faster then something natively compiled in C.

Last but not least, java is a managed language. So is python. It would make far more sense for gnome to embrace the two of those as the new api of the future then go for mono, which is a baby by comparison.

Reply Parent Score: 0

RE: Managed Code is what we need
by on Tue 20th Sep 2005 12:54 in reply to "Managed Code is what we need"
Member since:

This is the race and Microsoft does everything wrong it can: win32-winforms-avalon - 3 API changes in only several years. That's why .NET hasn't been adopted until now [except by ATI and HP]. The one who manages to move the majority of the code base from unmanaged to managed will rule upcoming 20 years of IT.

But M$ in a very good position. Easier to port the existing Visual Basic, C++, Delphi code to .NET to Java. The .NET environment give a language-independent class library and give a common CLR to every language. There are COBOL, RPG, Python, Object Pascal, etc. implementation for .NET.

And yes, while Java is a very consistent development environment, it is not usable for such a task.
It is true, but the major reason: the java is NOT changed to API. No databindnigs, no client-side database cache, etc. Yes, there are some independent development, but there is not any only one widely accepted. With ADO.NET any company can develop data-bounded web controls, windows.forms controls or any external components.

Reply Parent Score: 0

Member since:

But M$ in a very good position. Easier to port the existing Visual Basic, C++, Delphi code to .NET to Java. The .NET environment give a language-independent class library and give a common CLR to every language. There are COBOL, RPG, Python, Object Pascal, etc. implementation for .NET.

Try vb 6 to .net sometime, and tell me how easy it is ;-) but in general, your right. this is one of the coolest things about .net.

It is true, but the major reason: the java is NOT changed to API. No databindnigs, no client-side database cache, etc. Yes, there are some independent development, but there is not any only one widely accepted. With ADO.NET any company can develop data-bounded web controls, windows.forms controls or any external components.

Im not sure what you mean there. API stands for application programmers interface, and java has a better API then .net (or anything else ive ever used, its a cross platform os encapsulation). Data bindings and client side caching are very specific to the visual studio way of doing things, you are talking about VS code generation. And if you are going to tell me ASP offers more power to the developer then JSP, ill have to call bullshit. And say what you will about swing, its crime is over engineering, not under engineering. its power is staggering, unfortunately, so is the amount of code required to do anything (properly).

Reply Parent Score: 0