

Though, AFAIK this doesn't seem to be builtin part of GTK yet and require a little bit more custom code than other widgets. * In-app notifications (used for example for example for undo I have already mentioned). Thus, if developer didn't take this into account it probably doesn't work. Though, portability suffers as making it work in environments without client side decorations requires some custom code.

I prefer those over traditional menu bars, especially if number of different actions to perform is limited. Though, I don't understand why most applications insist on making it modal, which essentially prohibits looking at shortcuts and trying them out at the same time. * Different colors for constructive / destructive actions used consistently across applications. It delays deleting a contact instead of offering a real undo, which means that if you exit early no action is performed at all. Though, some applications got implementation completely wrong. * Emphasis on undo instead of confirmation dialogs. I don't use gedit, but in general I like look and feel of GNOME 3 applications: Also they are historically infamous for producing hard to understand error messages. which is a non-trivial process, much slower to compile than a plain non-generic function call. They have to be instantiated at compile-time again and again and again. They are one of the primary reasons why compiling C++ is so slow / resource intense. I did not even specify how random(a,b) was implemented, so making statements about the speed of the compiled code makes no sense here.Ĭ++'s templates are another nice example of the cost of generic code, though. It's all templates so it's all static code generation. >Furthermore I bet the generic, templated version is as small and fast as a naive implementation. Generic solutions solve problems you don't even have, and that comes at a price. It is a complete waste if you don't need that functionality. > Is 2 lines not an accepted tradeoff for being able to change the engine, and crucially, to draw numbers from any distribution you want? a 200% increase in code size! Now imagine that throughout the entire code base. >How do you mean, suboptimal? The fully generic version is 2 lines of initialization more than the restricted version. custom classes to model a domain) or generic ones (pairs, lists, maps, etc.), but generic doesn't always imply bloat and complexity. Of course, it depends completely on the context whether to use special-purpose datastructures (e.g. An example of this is Lisp's use of cons cells to represent data: regardless of the contents, and what it's meant to represent, we can always use `car` and `cdr` they're "generic".Ĭompare this to a typical OO approach, like a `Customer` object with a `name` and `dateOfBirth`: we can't access those fields without either writing those particular strings (`name` and `dateOfBirth`) in our code or use some complicated reflection approach to look up the names then use those to look up the data. On the other hand, code can also be "generic" by avoiding decisions, parameters and special-cases. I tend to distinguish between two uses of the word "generic": code can be "generic" by providing hooks/parameters to override every decision, which leads to complexity and bloat, as you mention.


#GEDIT ON MAC SOFTWARE#
I think the reliance of modern programmers on libraries which offer highly generic (and thus almost inevitably sub-optimal) solutions is one of the primary reasons for software boat. Often generic solutions are the best trade-off in the end, but one should not assume that more generic is automatically better. and is much simpler and more straight-forward because of that. The specialized version does not cover non-uniform distributions, nor the use case where you need multiple PRNGs with independent states. Std::uniform_int_distribution distribution(1,6) Generic version (this is from C++'s standard lib): More importantly generic code is almost inevitably bloated, less efficient, and more complex compared to code which only attempts to solve the actual problem at hand, as opposed to attempting to provide a generic solution for all imagined use cases.Ī simple example would be a PRNG.
