Hacker News new | past | comments | ask | show | jobs | submit login

Props to python.

However, what idea has C++ not accepted? It seems for it to be a "new" language, it should at least say "no" to something.




C++ says "no" to readability. Everything that has been added to C to create C++ was added in order to help out the person writing new code. Nothing that was added to C to make C++ is there to help the person trying to read the code. Though I doubt it was deliberate, much of what makes C++ different than C seems actively hostile to the person trying to read the code.


You really find

   auto x = new int[64];
harder to read than

   int* x = malloc(sizeof(int)*64);
?

If so, I think it's just a matter of habituation and imprinting. Whatever you learned first is easier and everything else is hard.


Both C and C++ have readability issues.

  ((void(*)())exec)();
or

  template <typename T>
  struct value_type {
    typedef typename T::value_type type;
  };
  
  template <typename T>
  struct value_type<T*> {
    typedef T type;
  };
Six of one, half a dozen of the other.


I think there's a gap that could be filled by making a nice front-end to C++ with nicer simpler (even Pythonic) syntax.

Drop the semi-colons, convert "dict of int to string' to map<int, std:string> etc.

It would be ok if it only did a subset of C++ at first.


Sounds like http://nim-lang.org/ . Just simplifying syntax is not a great idea for a system programming language though.


It doesn't have yield.

It also doesn't have Concepts yet, as they got pushed back again.


They're working on Concepts, and they're working on yield (search for resumable functions). Maybe they can say "no" to "saying no"? :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: