6 ms·
I'm not sure why you would want something like that, unless you really have a lot of existing code C++ business code you want to reuse, or you really love C++.
by mercurial 13y ago
I'm not sure why you would want something like that, unless you really have a lot of existing code C++ business code you want to reuse, or you really love C++.
- kirab 13y agoI really love C++ and I bet with the currently developing standard (C++11, C++14) more people will start loving C++ again :-)
- trimbo 13y agoI've been away from it for a few years and just recently picked up a new project in C++11. I'm loving the improvements.
- chrismorgan 13y agoHave you tried Rust? It's not an entirely stable language yet, but I've been absolutely loving it thus far in my few months of close involvement. C++11 and C++14 are vast improvements, but I reckon Rust is still considerably better than them. As far as Rust for the web is concerned, I've got pretty big ideas which Rust is instrumental in (I've been primarily a Python programmer hitherto, FYI), and so I'm working on the lowest layer at present, in rust-http (https://githib.com/chris-morgan/rust-http https://githib.com/chris-morgan/rust-http). By the time it's entirely ready for production use, I expect someone to have got Rust working with Emscripten too, and then we'll be ready to do even better than Duetto.
- betterunix 13y ago"I bet with the currently developing standard (C++11, C++14) more people will start loving C++ again" I doubt it. C++11 takes C++ even further from where it needs to be. Every high-level feature is bogged down by low-level annoyances. Do you capture variables by value or by reference? Do you need a weak pointer to break this cycle, or can you use a weak pointer somewhere else (or maybe just not both with smart pointers at all?)? Your destructor has an error to report -- now what? The reason nobody likes C++ is that it is overly complicated for low-level programming and too low-level and annoying for high-level programming. At best the only thing people can say about C++ is that it is "good enough" and popular.
- dman 13y agoI like C++ because it addresses problems relevant for building performant applications in the real world. Details matter for performance - the memory hierarchy, cost of small allocations, allocating and accessing aligned data, copying to enable concurrency are all real things.
- betterunix 13y agoDetails may matter for performance (though in my experience people tend to gravitate towards such things while ignoring asymptotic improvements that can be far more dramatic), but C++ is annoying even if that is something you are trying to do. C++ has a tendency to insert "surprises" into compiled code -- lots of implicit function calls, copies, etc. I saw this sort of thing first-hand when I TA'd a data structures course taught in C++, when a student came to me asking for help with some very bizarre behavior: a member function was being called for an object that had never been allocated. The problem was that the student had forgotten to write a return statement (why is that even allowed? compilers can obvious detect this, since using -Wall picked it up), and a virtual destructor call had been inserted, but the vtbl for some other object was sitting there and so some other member function for an unrelated class was called. So while you are sitting there trying to figure out if your class members are aligned optimally, your C++ compiler is inserting function calls and not letting you know about it. If it were just a few implicit calls or copies, it would not be a big deal, but C++ is a huge, complicated language with lots of such things. Basically, almost everything you mentioned is a low-level concern for which high-level constructs are just a distraction. The point of high-level programming is to direct programmer effort away from such things (hence the implicit function calls and copies, etc.). If you want to program at a low level, fine -- but my point was that in C++, low-level and high-level programming are too tightly coupled. Finally, it is worth pointing out that this: "copying to enable concurrency are all real things." Is not something C++ has any kind of advantage in. I do it in Lisp all the time. You see it in functional programming languages all the time.
- dman 13y agoThe C++ philosophy is to only pay for costs of things that you actually use. Making every check in -Wall an error by default would make every one pay the costs of those extra checks at compile time.
- xixi77 13y agoDoes this thing even support C++11? I see no mention of it on the home page...
- apignotti 13y agoIt fully supports C++11, part of the machinery for client/server seamless programming is based on C++11 capabilities - Alessandro of Leaningtech
- darkstalker 13y agoD has all the features C++ should have, and implemented in a sane way.
- bratsche 13y agoMaybe you have a project that you want to target both native platforms and the web. This becomes an option to let you do so with C++, in addition to being able to do so with Javascript. Maybe you don't like C++ personally, but more options is rarely a bad thing.
- flohofwoe 13y agoBeing able to use the web as "just another platform" and use a single unified codebase across all platforms is a killer feature, especially for games. Also, maybe I'm old-fashioned, but I'd rather do a team-project with a "million-lines-of-code" in a compiled language with static type system which gives me compile and linker errors if someone adds a new function arg or changes the type of an arg. Of course also with other "compiled-to-JS" languages, but the killer-feature is multi-platform from the same codebase.
- Shorel 13y agoOr want to run an app on very few servers instead of hundreds.
- protomyth 13y agoExisting code and talent and probably it. It might sound very silly, but if someone does a COBOL[1] or RPG IV to Javascript translator there would be a demand. 1) There is at least one company located in MN whose website is done in COBOL.