C++, but for how long?

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

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

#31 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 - 01:52 PM

actually D places restrictions on what you can or can't do. mostly it revolves around it's garbage collection.

take a look at what all is undefined

notable ones:

*do not use pointer values to create a. you can't cast a pointer to an integer to use as a hash value. this means that you can't make a hash table that uses pointers as keys.

*the result of comparing 2 pointers with <, >, <=, >= is undefined because in a copy collector the heap can be moved around and the value of pointers changed. D dose not this but still qualifies it as undefined. this means that something like std::map would be undefined for pointers.

*if you preform arithmetic on a pointer such that the result pointers to a location out side of the original range allocated on the heap, you have undefined behavior. this means that C++'s idea of end iterators would be undefined in D

*you can't use byte by byte memory copies such as memcpy to copy arrays of pointers as mists of coping a pointer can be lost because as 1 byte changes the whole value changes. not a huge deal though as using the '=' operator is just as efficient. still, it's limiting

*a structure can not be directly referential of itself as the member will not be updated if the pointer is moved(i don't have a clue why this is though)

the rest you wouldn't even do in C++ and most likely not even in C

This post has been edited by ishkabible: 09 December 2011 - 01:54 PM

Was This Post Helpful? 0
  • +
  • -

#32 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 09 December 2011 - 10:28 PM

View PostNikitin, on 09 December 2011 - 01:55 AM, said:

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.


Complex: "Consisting of many different and connected parts."
Developed: "Advanced or elaborated to a specified degree."

You've got me on complex -- I was definitely going against the definition there. But I'm not sure what you mean by it not being 'developed' anymore. Could you clarify? It feels like you're implying that Lisp is no longer on the cutting edge, in which case you'd be mostly wrong. "Back when it came out." doesn't make a lot of sense. Back when which one came out? There are and have been a number of Lisps over time. Several are still in very active development and one in particular, Clojure, has paved the way to practicality and is beginning to make an impact in the industry. All of the Lisps currently in existence have at least some features and innovations that no other modern language in widespread use has.

Anyways, you win this one. I got the definition of 'sophisticated' wrong. Given this definition, we can drop 'sophisticated' from the list of things that Lisp languages are. The rest still apply. Lisps are simple, powerful, flexible, and elegant.
Was This Post Helpful? 0
  • +
  • -

#33 jon.kiparsky  Icon User is online

  • Pancakes!
  • member icon


Reputation: 7872
  • View blog
  • Posts: 13,354
  • Joined: 19-March 11

Re: C++, but for how long?

Posted 09 December 2011 - 10:49 PM

This is what comes of trying to rely on a single dictionary definition, and not on your own grasp of the language.

Complexity is not a hallmark of sophistication generally, it is a mark of sophistication in certain cases. A sophisticated wine might be expected to have a complex flavor, a personality described as sophisticated might be assumed to be more complex than the ordinary.

A sophisticated musical or artistic composition might show deep complexity, or a more moving simplicity.

But in the common usage, a sophisticated design is generally the simplest and most elegant one, and when you speak of languages you're speaking of a question of design. Think of a machine, designed to do a job. An engineer examines it, and is able to simplify the design and do the same job with fewer parts, and at correspondingly reduced cost and risk of component failure. The result is a more sophisticated design, by virtue of increased simplicity, no?

Now, I don't care very much whether you want to call lisp a "sophisticated" language or not, but clearly the word has more nuance than the cited definition allows for.
Was This Post Helpful? 0
  • +
  • -

#34 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 10 December 2011 - 01:30 PM

Kind of a pointless and off-topic discussion now, so I'll just reply one more time.

Raynes: Lisp was being referred to as an old language (as opposed to a family of languages), so that's what I meant by 'Lisp' as well - one of the original Lisp implementations (which was really mind-blowing back in the day, or so I've read). If we're talking about Lisp as a language specification, then sure, you can add features to it for as long as you want.

View Postjon.kiparsky, on 09 December 2011 - 11:49 PM, said:

This is what comes of trying to rely on a single dictionary definition, AND not on your own grasp of the language.

FTFY.
Was This Post Helpful? 0
  • +
  • -

#35 perfectmak  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 23-July 12

Re: C++, but for how long?

Posted 23 July 2012 - 10:10 AM

I believe c++ will still stay around for a very long time.... Its core hardware functions are really powerfull and i don't see any other language trying to parallel that.
Was This Post Helpful? 0
  • +
  • -

#36 BBeck  Icon User is offline

  • Here to help.
  • member icon


Reputation: 581
  • View blog
  • Posts: 1,289
  • Joined: 24-April 12

Re: C++, but for how long?

Posted 23 July 2012 - 12:36 PM

View Postperfectmak, on 23 July 2012 - 10:10 AM, said:

I believe c++ will still stay around for a very long time.... Its core hardware functions are really powerfull and i don't see any other language trying to parallel that.


I have to agree with that. Nothing touches it. When I started dabbling in Assembler in Windows I quickly discovered that C/C++ is so close that the only reason to learn Assembler is academic.

There's just nothing as low level that can give you such absolute control. For that sort of programming, I think C++ is going to be around for a long time.

Also, it's cross platform compatiable for the most part. Granted it has to be recompiled for every platform and can get into platform specifics, but it's still usable on most platforms.

I hear Microsoft is working on a new C++. I'm not sure what that's all about, but I can't imagine anything really replacing C++ in the foreseeable future for the type of applications that benifit from low level control.
Was This Post Helpful? 0
  • +
  • -

#37 macosxnerd101  Icon User is offline

  • Self-Trained Economist
  • member icon




Reputation: 10646
  • View blog
  • Posts: 39,539
  • Joined: 27-December 08

Re: C++, but for how long?

Posted 23 July 2012 - 01:12 PM

View Postperfectmak, on 23 July 2012 - 01:10 PM, said:

I believe c++ will still stay around for a very long time.... Its core hardware functions are really powerfull and i don't see any other language trying to parallel that.

Please avoid necroposting if you don't have anything significant to add to the thread.
Was This Post Helpful? 0
  • +
  • -

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