Skip to main content
23 events
when toggle format what by license comment
Oct 21, 2017 at 6:28 comment added Jean-Michaël Celerier > "In Cocoa/Obj-C, you would be able to send messages ('call functions') to an object right within the debugger. You can change the objects state, you can query it for its attributes, you can ask it for its type and its function names... " You can do all of this in C++ with gdb or lldb (and most with the GDB integration of QtCreator)
Feb 27, 2017 at 0:29 comment added Demi @DavidThornley C++ doesn't provide memory safety: the guarantee that a program that compiles (and doesn't deliberately use unsafe language features, or interface with code that does) cannot corrupt memory. Ever. That alone will save an incredible amount of debugging time.
Oct 14, 2014 at 14:28 comment added phorgan1 I know this was two years ago, but no one mentioned that from the debugger you can also call into methods of C++ classes. Even given an abstract pointer you can query it's type, cast to the right type and call into the class's methods.
Sep 18, 2013 at 6:53 history made wiki Post Made Community Wiki by user102518
Nov 20, 2012 at 21:07 comment added Giorgio @SK-logic: "it [C++] is just designed that way that the low level entities will unavoidably leak into higher levels of abstraction": If you had written this in an answer you would get 10 up-votes from me.
Oct 19, 2011 at 22:32 comment added SK-logic @DavidThornley, template metaprogramming in C++ is a joke, if you compare it with even such a basic thing as hygienic macros in Scheme. And it will not survive a comparison against Lisp metaprogramming. It is nothing more than a set of crutches, which supports language from falling apart, but certainly not helping in raising the level of abstraction cap. Java with reflection, for example, allows building ad hoc embedded interpreters easily, with a granted integration with the rest of the Java environment. In C++ you'll see lots of low level guts in a similar implementation.
Oct 19, 2011 at 20:15 comment added David Thornley @SK-logic: Template metaprogramming is Turing-complete, and there are people smart and knowledgeable enough to take advantage of that. RAII isn't great garbage collection, but the fact that it works for all sorts of resources more or less makes up for that. Now, specifically, what sort of abstraction works in Java but not C++?
Oct 19, 2011 at 18:47 comment added SK-logic @David Thornley, it is an incorrect question. Not "what abstractions does a language provide?", but "what kind of abstractions can be expressed in a language?". Smart pointers you've mentioned can't be smart enough (reference counting is the worst GC ever), but with a real, transparent GC, with high order functions and reflection you can do a lot, without ever leaking low-level abstractions. You're talking about syntax sugar, it does not normally count as a way to introduce an abstract layer. Template metaprogramming is too limited in C++ to save it from being low level.
Oct 19, 2011 at 18:40 comment added David Thornley @SK-logic: Okay, what abstractions do Java or C# have that I can't match in C++ with containers/iterators/algorithms, smart enough pointers, classes with operator overloading, and/or somebody else's template metaprogramming? Now, consider a decimal number data type. Certainly, using it just like a regular number is a desirable abstraction. How do you do that in Java?
Oct 19, 2011 at 15:00 comment added SK-logic And, Wikipedia article is irrelevant here: language can't be low- or high- level on its own, only in comparison with another language. C++ is a pretty low level language (i.e., closer to the hardware, more limited ways of expressing high level abstractions) even when compared to the other, also not very high level languages like Java or C#.
Oct 19, 2011 at 14:57 comment added SK-logic @David Thornley, I meant that there is an upper limit on what level of abstraction C++ allows you to achieve. As all the other low-level languages it is just designed that way that the low level entities will unavoidable leak into higher levels of abstraction. It is not a good or bad property - it is just how the language is positioned in the hierarchy of the programming languages.
Oct 19, 2011 at 14:46 comment added David Thornley @SK-logic: While I think I understand all the words in your third sentence, I have no idea what you are saying. What is a "level of abstraction cap"? For that matter, your first sentence is false, given the Wikipedia definition of "low-level language".
Oct 19, 2011 at 10:34 comment added SK-logic @Dehumanizer, C++ is a low-level language. By definition. It has a level of abstraction cap.
Jul 4, 2011 at 6:48 comment added bastibe @GeorgeEdison stackoverflow.com/questions/321709/…
Jul 3, 2011 at 22:08 comment added Nathan Osman "The fact alone that it is C++ will make every Qt programmer significantly less productive compared to Frameworks written in other languages." [citation needed]
Jul 3, 2011 at 21:25 history edited bastibe CC BY-SA 3.0
added 1162 characters in body
Jul 1, 2011 at 18:23 comment added Mircea Chirea @Paperflyer, as Qt is an application framework, most of your code will be "managed" by it and hence memory management is no longer an issue when your code is inside QObject's. And even if it isn't, the Core module has lots of useful classes that make allocating memory very rare - just use QByteArray if you even need a chunk of raw memory.
Jul 1, 2011 at 17:11 comment added Edward Strange I've heard "introspection" used a lot as an apparent buzzword but wasn't sure what people where referring to so I looked it up. According to wikipedia, it's nothing but being able to tell what type something is at runtime. C++ provides this with typeid and dynamic_cast.
Jul 1, 2011 at 13:50 comment added Steve S I'm really curious what you think Qt Designer lacks. I haven't used recent versions of the other tools you mentioned, so I don't know what I'm missing.
Jul 1, 2011 at 12:38 comment added deo to your point nr 1. I think c++ does have kind of semi-automatic memory management: if you use smart pointers like std::auto_ptr or boost::shared_ptr etc. you generally dont have to care about freeing memory. These kind of containers can be made for other resources as well (files, system resource which have to be freed). Use of RAII-pattern helps very much with memory management and as it grows into you, you dont really have to worry about memory.
Jul 1, 2011 at 12:27 comment added bastibe @Dehumanizer: Try programming some real project in Cocoa/Obj-C for a change. Or .Net/C#. or Android/Java. Then re-evaluate your opinions about C++ being high-level and QtDesigner being adequate. As for memory management: Yes, Qt cares for its own memory. But C++ does not.
Jul 1, 2011 at 11:47 comment added Dehumanizer 1. Qt cares of memory management on its own, you have not to call 'delete' after each 'new'. 1a. C++ is NOT low level language, it is high level language with low-level 'abilities'. 3. I agree, but Qt provides to make a UI with QtDesigner and with 'plain code' in same time. 4. Agree again, but Qt also provides to use native APIs.
Jul 1, 2011 at 11:45 history answered bastibe CC BY-SA 3.0