Live data from Hacker News

Cooperative C++ Evolution – Toward a TypeScript for C++

herbsutter.com

41–50 of 209 posts

Re: Cooperative C++ Evolution – Toward a TypeScript for C++

#41

Neither TypeScript nor Dart are relevant technologies to people interested in C++. It's weird to refer to these arguably bad web technologies to market an unrelated initiative.

I sort of agree: As a C++ developer I have no idea what TypeScript or Dart really are... but it's Herb Sutter so I'll give him my time. He's surely earned that at the very least?

Re: Cooperative C++ Evolution – Toward a TypeScript for C++

#42

Neither TypeScript nor Dart are relevant technologies to people interested in C++. It's weird to refer to these arguably bad web technologies to market an unrelated initiative.

Why is TypeScript a "bad web technology"? It's not really a "web technology" at all. It's a language which transpiles to standard JavaScript. The only real web-geared parts of TypeScript are the included (optional) DOM typings.

Type annotations for dynamically-typed languages is just a bad idea.

JavaScript's only reason for existence is web browsers. If you're not doing web stuff do yourself a favour and use something else.

Re: Cooperative C++ Evolution – Toward a TypeScript for C++

#46

C++ only needs 4 things: gradually-introducable memory safety, static reflection, first-class compile time string manipulation, and adoption+refinement of its modules feature.

I'd add less verbose ranges. Idk about memory safety, optional and expected are working pretty well for me (i just use it on personal projects though)

Re: Cooperative C++ Evolution – Toward a TypeScript for C++

#47

C++ only needs 4 things: gradually-introducable memory safety, static reflection, first-class compile time string manipulation, and adoption+refinement of its modules feature.

I'd also vote for std::string split and join functions. And networking.

Re: Cooperative C++ Evolution – Toward a TypeScript for C++

#48

Earlier quoted context omitted.

Yeah once they implement the proposal to add types we will

The whole point of JavaScript is that it's dynamically-typed. If you want static typing just use C++ or any other established programming language.

I’m not sure how people are supposed to do that in the browser. This feels like an excessively dismissive comment.

Re: Cooperative C++ Evolution – Toward a TypeScript for C++

#49

Earlier quoted context omitted.

Yeah once they implement the proposal to add types we will

The whole point of JavaScript is that it's dynamically-typed. If you want static typing just use C++ or any other established programming language.

> it's dynamically-typed

Yet, most of the code people write has statically defined types.

Anyway, the whole point of JavaScript is that it runs on the browser. Outside of that, it has no strong points. Even though most of them are not weak enough to immediately abandon the language, its type system is one of the weakest.

Re: Cooperative C++ Evolution – Toward a TypeScript for C++

#50

After the talk, the activity on it is nearly zero since then, in a world where ideas are cheap, show me the code, this does not seem promising to me. On the other hand, carbon has been very actively developed since its announcement, which also claims to be a typescript-for-c++. Now it also wants to be a memory safe: https://www.youtube.com/watch?v=1ZTJ9omXOQ0 I'm forced to learn rust but I hope carbon will take off A…

> After the talk, the activity on it is nearly zero since then...

Is that true? Seems like he is actively working on it:

https://github.com/hsutter/cppfront/commits/main

Post reply on HN