You are not logged in.

#1 2012-04-01 07:38:13

holland01
Member
Registered: 2011-12-22
Posts: 50

M vs. UM - An introspection into the future.

Ok, so we all are aware that managed languages are becoming the fad now right? .NET is upon everything; its reign is working its way through our CPUs (well, those of us that dual boot - hehe -) and we basically have to deal with it.

Let's look at this from a more serious case, however.

First off, I am not Anti-Windows (ok, well, maybe I am to an extent - but, I still find uses for it so I can't quite be completely biased). Second of all, I hope for this to be an objective discussion, as most of the community here appears to be just that - objective. It's a little hard to keep this kind of a pace, given that there are many, many flame wars and "language holy wars" on this particular topic, but, alas, we are adults (well, I'd imagine at least most of us are).

The hardest language I have programmed in is C++. My interests are more geared towards learning the actual ins and outs of an operating system; I plan to learn Assembly code eventually once I've acquired enough knowledge from the realm of C.S. and learning of the mathematics behind things. For now, I spend my time with Web Development in PHP since it's easier to actually make money with.

My background is primarily in C#, C++, and PHP. I've dabbled in other languages here and there, but ultimately these are the three languages I can pick up and just start coding with right off the bat.

/Off-topic

Every programmer knows that C++ is unmanaged, can be faster, and C# is managed and is thus slower - even with a JIT compiler.

Now, despite this, C# is widely used and evermore popular today - especially since it operates off of the .Net framework, which is much, much more easier to use than, say, the STL of C++.
Of course, with recent advancements in C++0x, I'm sure we'll see some nicer things coming this way ("shared_ptr<void*>" anyone?). Qt, is definitely a great, great framework which supports RAD, or Rapid Application Development. OpenGL gives the programmer more control over their graphics render, especially with languages like GLSL, or the OpenGL Shading Language.

On the flip side, C# does a lot of things which C++ can do, and makes life much easier, especially considering how everything is managed for the programmer. With Xamarin's new MonoDroid framework, life has become easier in terms of making mobile devices pretty much cross platform.

From my perspective, I'd say C# is an overall good language, and the same goes to C++.

But...

There's more to it than meets the eye. The question is how do these languages affect our PCs which we oh, so love?

Let's look at this from a different perspective.

Kurtzweil himself has said it: the rate of technological progression is not only increasing, but increasing exponentially. (Quantum Computer, anyone? Hmm? Hmm?)

How this applies to the topic at hand is in regards to memory management, and how our moneys our spent on obtaining the latest and greatest technologies. C# allocates more RAM typically than a [well-written] C++ program. This is because it's managed. Yet, when thinking about it, is this part of the reason why as every two years passes the standard amount of RAM per computer just suddenly doubles? Take Windows for example: it's slow, and I mean slow. Could this be because it allocates so much memory in its managed programs, that we have to go out and buy stronger and faster hardware for our CPUs?

Back in the year 2000, anyone who had a gigabyte of RAM was totally set. AND, while Java was definitely popular, FAR more programs were written in C++ then.

Hmm...

Your thoughts, please.

Offline

#2 2012-04-01 16:00:44

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,334

Re: M vs. UM - An introspection into the future.

I design embedded systems which require deterministic behavior with hard real-time deadlines.  I loath managed code.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2012-04-02 06:47:01

holland01
Member
Registered: 2011-12-22
Posts: 50

Re: M vs. UM - An introspection into the future.

I'm not much of a fan of it, either, tbh. After working in languages like C#/PHP, while I like them, I can't help but think of every single possible way I can optimize my code. It even goes down to the IF statements. I have optimize-eh-hitus.

Only reason why I'm writing in PHP right now is...well, it's easy for what I'm trying to achieve. Heh.

Offline

#4 2012-04-02 07:04:35

/dev/zero
Member
From: Melbourne, Australia
Registered: 2011-10-20
Posts: 1,247

Re: M vs. UM - An introspection into the future.

holland01 wrote:

Your thoughts, please.

What on? I don't get it. Do you have a point? Are you asking for some opinions? - but on what issue?

Offline

#5 2012-04-02 17:23:43

holland01
Member
Registered: 2011-12-22
Posts: 50

Re: M vs. UM - An introspection into the future.

I'm looking for people's opinions on managed code vs. unmanaged code, as well as how much of an impact managed code has on the future.

Offline

#6 2012-04-02 19:32:07

/dev/zero
Member
From: Melbourne, Australia
Registered: 2011-10-20
Posts: 1,247

Re: M vs. UM - An introspection into the future.

holland01 wrote:

I'm looking for people's opinions on managed code vs. unmanaged code, as well as how much of an impact managed code has on the future.

You might find this interesting; it was a similar sort of question.

Offline

#7 2012-04-02 21:04:03

Bellum
Member
Registered: 2011-08-24
Posts: 230

Re: M vs. UM - An introspection into the future.

I think C++ is on its way out. It was primarily used for Microsoft products (MFC), but those days are going away. It doesn't have much prominence in NIX, as far as I can tell.

Native code isn't going anywhere. It will continue to be on the decline, which is probably a good thing, though a clean, successful language to succeed C is something of a holy grail. But it isn't going anywhere because there are still problems which nothing else will solve, or wont be solved reliably enough otherwise.

Offline

#8 2012-04-03 08:27:22

Blµb
Member
Registered: 2008-02-10
Posts: 224

Re: M vs. UM - An introspection into the future.

C++ might actually gain some momentum with the C++11 standard - personally I like it. The main problem with C++ is that people often abuse it.
People always abuse languages, except C++ is probably more "abusable" than other languages.
An example (that also works in C) would be storing pointers in integers... that's just silly. A C++ only example would be deriving an STL class and using an undocumented function/variable/behaviour that is most probably specific to the implementation on your specific system/compiler. etc. etc.

C will always be there. C11 is also quite nice. The problem with C though is that not even the C99 standard is supported everywhere yet... STILL!

Layers over layers. Each language has its place*. I don't though though, that we need a successor for C. What we need is a compiler that supports all standards properly, which works on all systems.
We will always need native code, so C will most likely stay for a long while.
We will probably always "need" GUIs**, and while C works, it's probably a better idea to use a language that doesn't need to be compiled to native code, though I'd reject any language which cannot at least be JIT compiled... GUIs are so slow these days.
ASM will always be required, otherwise there soon won't be any people left who can work on the lowlevel compilers.

* Often the place is the trashcan.
** Yay for terminals... and I fear the day when GUIs get completely replaced by voice-systems tongue


You know you're paranoid when you start thinking random letters while typing a password.
A good post about vim
Python has no multithreading.

Offline

#9 2012-04-03 12:08:37

Bellum
Member
Registered: 2011-08-24
Posts: 230

Re: M vs. UM - An introspection into the future.

I think a replacement to C would be great. Have you seen the preprocessor lately? Had to deal with Unicode? I'm looking at some code now and my eyes are bleeding from all the tricks needed to solve modern software problems. It ain't 1969 anymore. The thing is, is the new systems languages are too big and try to hold your hands too much. We need a new language that embraces the metal.

In fact, if I could just get Jack Black to write all my code, that'd be great.

Offline

#10 2012-04-03 12:27:08

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,847

Re: M vs. UM - An introspection into the future.

I've not looked into it more than reading the odd news article, but aren't the C issues the reason why Go was created (though it may not be there yet in terms of infrastructure, library support, etc.)? My recollection is that Pike and Thompson wanted a new language for systems programming.


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

#11 2012-04-03 12:34:52

Bellum
Member
Registered: 2011-08-24
Posts: 230

Re: M vs. UM - An introspection into the future.

Yeah. I don't know that much about go; I've just been looking at it a bit the past few days. My impression is that it is very useful, but not in all the ways C is useful. One thing I know for sure is the build system sacrifices flexibility for simplicity. I don't think it even supports dynamic linking.

Offline

#12 2012-04-03 13:35:24

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: M vs. UM - An introspection into the future.

Bellum wrote:

I think C++ is on its way out. It was primarily used for Microsoft products (MFC), but those days are going away. It doesn't have much prominence in NIX, as far as I can tell.

Did you mean to say C#, or do you know anything I don't?

Offline

#13 2012-04-03 13:45:46

Bellum
Member
Registered: 2011-08-24
Posts: 230

Re: M vs. UM - An introspection into the future.

Awebb wrote:
Bellum wrote:

I think C++ is on its way out. It was primarily used for Microsoft products (MFC), but those days are going away. It doesn't have much prominence in NIX, as far as I can tell.

Did you mean to say C#, or do you know anything I don't?

Yeah. Also, just look at the monstrosity that is Windows 8. Most of those apps are written in Javascript or something stupid like that, aren't they? It's not just about C#, Microsoft is looking to push apps that will be portable across multiple MS devices. The ship is sinking and they're trying to catch up with Apple and Google.

Offline

#14 2012-04-03 16:25:03

holland01
Member
Registered: 2011-12-22
Posts: 50

Re: M vs. UM - An introspection into the future.

It's true that their products are failing pretty hardcore. I remember reading about FireFox refusing to develop their browser for WP7 simply because they didn't allow native code on it. I think C# is a well designed language (apart from the managed bit, which I loathe - the IDisposable interface is a joking illusion), but it's too reliant on MS. And Mono really isn't that great, especially ever since they went Xamarin - .Net for Android? Sure, it's convenient, but I'd like to write my code in C++ with a Java frontend (and only because there's no other option when using the NDK - i.e., Java frontend is the only way to go).

Offline

#15 2012-04-03 20:09:49

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: M vs. UM - An introspection into the future.

I was only confused, because I didn't know if you really mean C++ is a dead horse.

Offline

#16 2012-04-04 00:26:04

Bellum
Member
Registered: 2011-08-24
Posts: 230

Re: M vs. UM - An introspection into the future.

Don't think it has much of a future down the road, no.

Offline

#17 2012-04-04 09:44:07

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: M vs. UM - An introspection into the future.

What? C++ or C#? Ain't no twitter'ere *shakesfist* smile

Offline

#18 2012-04-04 14:50:54

Bellum
Member
Registered: 2011-08-24
Posts: 230

Re: M vs. UM - An introspection into the future.

Heh, C++. Though C# is in the same boat as C++ in that its survival depends almost entirely on the backing of Microsoft. I wouldn't put money on it.

Offline

#19 2012-04-07 17:52:35

holland01
Member
Registered: 2011-12-22
Posts: 50

Re: M vs. UM - An introspection into the future.

If anything, Microsoft RUINED C++ with their CLR implementation. I would say with Qt C++'s popularity has become even better, as it provides a good replacement to the STL library, which, while usable, is severely lacking these days in comparison to modern standard language libraries. Plus, it has a strong backing in the Linux community - a lot of people would rather use GCC as opposed to a VC++ compiler anyway.

I'd say C++ still has quite the future down the road, actually. With Android making its improvements to the NDK, it will be easier to write unmanaged code for mobile, and mobile is what's really taking off these days.

Offline

#20 2012-04-09 00:30:55

bsilbaugh
Member
From: Maryland, USA
Registered: 2011-11-15
Posts: 141

Re: M vs. UM - An introspection into the future.

If memory serves, the reason managed code evolved was because your average programmer had a hard time writing correct (memory safe) code using languages such as C and C++, or at the very least had to invest more time into testing and debugging. So, in the hands of imperfect/entry level programmers, a managed code may be more reliable and possibly better performing than an unmanaged code (e.g. a poorly written C code can give horrible performance and mysteriously eat a lot of memory). Of course, in competent hands, it's tough to beat the performance of a well written C code.

As far as the future is concerned, I guess it really depends on the competence of the next generation. Maybe they'll all have brain implants that enable them to write highly optimized assembly smile If nothing else, let's just pray this doesn't happen: Idiocracy

Personally, I like the approach taken by the designers of D. By default D manages memory for you (garbage collected), but you can also write sections of code in which you manage the memory manually. To some degree you can do this in C++ via smart pointers.

Last edited by bsilbaugh (2012-04-09 00:31:34)


- Good judgement comes from experience; experience comes from bad judgement. -- Mark Twain
- There's a remedy for everything but death. -- The wise fool, Sancho Panza
- The purpose of a system is what it does. -- Anthony Stafford Beer

Offline

#21 2012-04-09 01:10:36

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,334

Re: M vs. UM - An introspection into the future.

bsilbaugh wrote:

... If nothing else, let's just pray this doesn't happen: Idiocracy

That could never happen -- wait, what?  (At least you are a lot closer to the center of the idiocracy than am I.  It is in your back yard tongue)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#22 2012-04-09 02:10:55

bsilbaugh
Member
From: Maryland, USA
Registered: 2011-11-15
Posts: 141

Re: M vs. UM - An introspection into the future.

ewaller wrote:

(At least you are a lot closer to the center of the idiocracy than am I.  It is in your back yard tongue)

(It could be worse. We could have elected Arnold Schwarzenegger as our governor. That would have been really, really, embarrassing. big_smile)


- Good judgement comes from experience; experience comes from bad judgement. -- Mark Twain
- There's a remedy for everything but death. -- The wise fool, Sancho Panza
- The purpose of a system is what it does. -- Anthony Stafford Beer

Offline

#23 2012-04-09 02:43:38

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,334

Re: M vs. UM - An introspection into the future.

bsilbaugh wrote:

...It could be worse. We could have elected Arnold Schwarzenegger as our governor. That would have been really, really, embarrassing. big_smile)

LOL;  Guilty hmm

Back on topic, I do like C++ with smart pointers when coding on something with an OS.  For embedded devices that are not complex enough to require an OS, it is straight C.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#24 2012-04-09 17:07:16

holland01
Member
Registered: 2011-12-22
Posts: 50

Re: M vs. UM - An introspection into the future.

Just out of curiosity, why straight C?

Offline

#25 2012-04-09 17:52:33

Bellum
Member
Registered: 2011-08-24
Posts: 230

Re: M vs. UM - An introspection into the future.

I've never written code for embedded devices, but I've read that among other things, a good C++ compiler is really difficult to write.

Offline

Board footer

Powered by FluxBB