C++, but for how long?

  • (3 Pages)
  • +
  • 1
  • 2
  • 3

36 Replies - 3330 Views - Last Post: 23 July 2012 - 01:12 PM

#16 RexGrammer  Icon User is offline

  • Coding Dynamo
  • member icon

Reputation: 181
  • View blog
  • Posts: 777
  • Joined: 27-October 11

Re: C++, but for how long?

Posted 07 December 2011 - 11:59 AM

View Postdorknexus, on 07 December 2011 - 05:51 PM, said:

When a language emerges that better meets their requirements?


yeah... (If it was that kind of question :) )

View PostBetaWar, on 07 December 2011 - 06:46 PM, said:

Well lets look at this from another direction. C is the Operating System standard. C++ came out, and people would have thought that that would have better met the needs of the OS developers, but none of the major operating systems ever changed over. Sure, there have been some independent OSs written in C++, but the same thing could be said for Java, or C#, or a number of other languages.For that reason, I don't think that C++ will be overthrown as the game standard until something can completely blow it out of the water... probably along with C... and every other language out there.


But why is it like that? If there is a language that better suits some purpose, why use the old one?
Was This Post Helpful? 0
  • +
  • -

#17 BetaWar  Icon User is offline

  • #include "soul.h"
  • member icon

Reputation: 1147
  • View blog
  • Posts: 7,132
  • Joined: 07-September 06

Re: C++, but for how long?

Posted 07 December 2011 - 12:00 PM

I think that has already been covered -- code already exists in that language. Why re-reinvent the wheel?
Was This Post Helpful? 0
  • +
  • -

#18 CTphpnwb  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2911
  • View blog
  • Posts: 10,083
  • Joined: 08-August 08

Re: C++, but for how long?

Posted 07 December 2011 - 07:35 PM

View PostBetaWar, on 07 December 2011 - 02:46 PM, said:

Well lets look at this from another direction. C is the Operating System standard.

Actually, much of OS X is written in Objective C, mostly because it allows for faster development. That's a significant reason* Apple has been able to come out with so many significant system upgrades over the last eleven years. If you look at the number of revisions versus other operating systems over that time period you could make the case that Objective C is the operating system standard. After all, progress is more significant in the long run than the number of boxes sold. ;)


* Or it could be that their frameworks are better and the language isn't so critical.

This post has been edited by CTphpnwb: 07 December 2011 - 07:36 PM

Was This Post Helpful? 0
  • +
  • -

#19 lordofduct  Icon User is offline

  • I'm a cheeseburger
  • member icon


Reputation: 2533
  • View blog
  • Posts: 4,633
  • Joined: 24-September 10

Re: C++, but for how long?

Posted 08 December 2011 - 07:41 AM

Or that they built their system on top of an existing unix core, and still take code from the open-source community (I'm not saying they're bad for this). Not having to write a lot of code makes writing code faster.
Was This Post Helpful? 0
  • +
  • -

#20 CTphpnwb  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2911
  • View blog
  • Posts: 10,083
  • Joined: 08-August 08

Re: C++, but for how long?

Posted 08 December 2011 - 08:18 AM

Sure, changes to the core can come from open source but the core isn't where most of the changes have been. I don't think you can say that most of the changes to the core came from open source either.
Was This Post Helpful? 0
  • +
  • -

#21 no2pencil  Icon User is online

  • Toubabo Koomi
  • member icon

Reputation: 5230
  • View blog
  • Posts: 27,015
  • Joined: 10-May 07

Re: C++, but for how long?

Posted 08 December 2011 - 08:36 AM

View PostRexGrammer, on 07 December 2011 - 01:59 PM, said:

If there is a language that better suits some purpose, why use the old one?

Because 'better' is relative.

Think of it in terms of transportation. Flying will get me the furthest distance the fastest. But the wait times & TSA agents are a pain in the ass. Ferrari's are very stylish & fast, but terribly expensive & non-fuel efficient. I can fit a lot of people in a van, but it's slow & sluggish. Cars built for better fuel consumption doesn't cost much for day to day transportation, but travel is a bore. A motorcycle is both fuel efficient & quick, however it's a possible coffin on wheels if I don't watch out for ever other idiot on the road. Or I could take a bus which is very cheap, but terribly slow & horribly not-comfortable. Lastly I could hitch with friends... or strangers.

Which one of those is best for you is not best for someone else.

If you want to use the latest & the greatest high-end development tool because it works with said operating system to produce a GUI based binary executable file, fine. Great. But that doesn't do squat for OS & driver development.

Best tool for the job is not always the best tool.

So 'better' is relative.
Was This Post Helpful? 3
  • +
  • -

#22 Raynes  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 611
  • View blog
  • Posts: 2,815
  • Joined: 05-January 09

Re: C++, but for how long?

Posted 08 December 2011 - 11:57 AM

View PostNikitin, on 07 December 2011 - 01:53 AM, said:

Lisp is anything but sophisticated. One of the simplest languages out there.


Sophisticated and complex are two very different things. Lisp is simple, powerful, flexible, sophisticated, and elegant. It is the combination of these things that make it so excellent. Sophistication and simplicity are not mutually exclusive.
Was This Post Helpful? 0
  • +
  • -

#23 Nikitin  Icon User is offline

  • D.I.C Regular

Reputation: 56
  • View blog
  • Posts: 264
  • Joined: 02-August 10

Re: C++, but for how long?

Posted 08 December 2011 - 06:55 PM

View PostRaynes, on 08 December 2011 - 12:57 PM, said:

View PostNikitin, on 07 December 2011 - 01:53 AM, said:

Lisp is anything but sophisticated. One of the simplest languages out there.


Sophisticated and complex are two very different things. Lisp is simple, powerful, flexible, sophisticated, and elegant. It is the combination of these things that make it so excellent. Sophistication and simplicity are not mutually exclusive.


"Sophisticated - highly complicated or developed : complex" -- Merriam-Webster

It was definitely "developed" (again, using Merriam-Webster's definition) back when it came out, but it's not the case anymore. So I'm still standing by my original comment.
Was This Post Helpful? 0
  • +
  • -

#24 Bellum  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 53
  • Joined: 04-February 09

Re: C++, but for how long?

Posted 08 December 2011 - 08:05 PM

I think there's a lot to like about D, myself.

All the cool kids' APIs are written in C, though. :(
Was This Post Helpful? 0
  • +
  • -

#25 jon.kiparsky  Icon User is offline

  • Pancakes!
  • member icon


Reputation: 7627
  • View blog
  • Posts: 12,856
  • Joined: 19-March 11

Re: C++, but for how long?

Posted 08 December 2011 - 10:10 PM

View PostNikitin, on 08 December 2011 - 08:55 PM, said:

"Sophisticated - highly complicated or developed : complex" -- Merriam-Webster

It was definitely "developed" (again, using Merriam-Webster's definition) back when it came out, but it's not the case anymore. So I'm still standing by my original comment.


You're leaving out the other sense of it - "elegant, highly cultured". Lisp is certainly elegant. And it's actually quite highly developed these days. After all, there are things in lisp, such as higher-order functions, which simply cannot be expressed in a language such as Java. This allows you to have a function like "map" which takes a list and a function, and applies the function to each member of the list in turn. This is an incredibly elegant idea, which is only expressible in very clumsy ways in languages not inspired by lisp.
You can find ways to do the same work, of course, that's what turing-complete means, but often the simplest way to do that is to simply write a subset of lisp and use that.

I'm not a lisp hacker - yet - but I don't think you can reasonably call it lacking in sophistication.
Was This Post Helpful? 0
  • +
  • -

#26 Bellum  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 53
  • Joined: 04-February 09

Re: C++, but for how long?

Posted 08 December 2011 - 10:20 PM

A for loop is clumsy? :/
Was This Post Helpful? 0
  • +
  • -

#27 jon.kiparsky  Icon User is offline

  • Pancakes!
  • member icon


Reputation: 7627
  • View blog
  • Posts: 12,856
  • Joined: 19-March 11

Re: C++, but for how long?

Posted 08 December 2011 - 10:36 PM

Okay, now can you write me a method that takes some arbitrary function - which one is unknown at compile time - and applies it to a list, also unknown at compile time?

I can do that by wrapping the functionality in an object with an "execute" method, making that object implement an interface, and then doing
for (SomeType st : someList)
mappableObject.execute(st);


But that requires a lot of setup code, the mappable object has to come from a set of function that I've prepared ahead of time. Oh, and I also have to deal with type safety, so it's likely that I'd have to write a bunch of Reflection. What I certainly can't do is generate that function on the fly. Well, I could. I could write code that would write the method out to a .java file and then call the compiler to compile it and then... but I wouldn't do that. That would be far out of line for any application you might want to use it for. It would be simpler to just implement a little lisp for the purpose.

So yes, trying to do this with a for loop would be clumsy.
Was This Post Helpful? 0
  • +
  • -

#28 ishkabible  Icon User is offline

  • spelling expret
  • member icon




Reputation: 1622
  • View blog
  • Posts: 5,709
  • Joined: 03-August 09

Re: C++, but for how long?

Posted 09 December 2011 - 09:48 AM

Quote

I think there's a lot to like about D, myself.

All the cool kids' APIs are written in C, though.


C++ is SOOOOOO misunderstood sometimes :/ i like D but it's no C++ slayer

C++ gives you as much control as C dose yet also allows to exercise this control in an expressive manner. C++ is fast, that's true, but the real place where is shines is control. the motto "you pay for what you use" is violated so often. i feel like D takes the philosophy that everything should have a practical easy to understand solution and that if that means adding 1000 features into the language and that you pay for those features no matter what then so be it. it's not the next C++, it's a completely different language all together. it has done an excellent job of making everything easy and it is a really neat language.

also, you can use C code in D by linking to the C code's binary with your D code. no need to make some fancy interface. D is a systems level language; a pointer in D is just like a pointer in C or C++, the only real difference for pointers is that D has a conservative garbage collector(something i don't like) that runs in the background.

This post has been edited by ishkabible: 09 December 2011 - 09:52 AM

Was This Post Helpful? 0
  • +
  • -

#29 Bellum  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 53
  • Joined: 04-February 09

Re: C++, but for how long?

Posted 09 December 2011 - 09:52 AM

What can C++ do that D can't, exactly?
Was This Post Helpful? 0
  • +
  • -

#30 lordofduct  Icon User is offline

  • I'm a cheeseburger
  • member icon


Reputation: 2533
  • View blog
  • Posts: 4,633
  • Joined: 24-September 10

Re: C++, but for how long?

Posted 09 December 2011 - 10:04 AM

I don't think anyone said D couldn't do something C++ can.

Just that it D isn't a C++ killer.
Was This Post Helpful? 0
  • +
  • -

  • (3 Pages)
  • +
  • 1
  • 2
  • 3