design-rationale

Why shouldn't C#(or .NET) allow us to put a static/shared method inside an interface?

Why shouldn't C#(or .NET) allow us to put a static/shared method inside an interface? seemingly duplicate from here. but my idea is a bit different one, I just want to put a helper for my plugins(interface) shouldn't C# at least allow this idea? namespace MycComponent { public interface ITaskPlugin : ITaskInfo { stri...

Why does std::map operator[] create an object if the key doesn't exist?

Hi, I'm pretty sure I already saw this question somewhere (comp.lang.c++? Google doesn't seem to find it there either) but a quick search here doesn't seem to find it so here it is: Why does the std::map operator[] create an object if the key doesn't exist? I don't know but for me this seems counter-intuitive if you compare to most othe...

Delphi: What is Application.Handle?

What is TApplication.Handle? Where does it come from? Why does it exist? And most importantly: why do all forms have it as their parent window handle? The Delphi help says: TApplication.Handle Provides access to the window handle of the main form (window) of the application. property Handle: HWND; Description ...

Why does the standard library have find and find_if?

Couldn't find_if just be an overload of find? That's how std::binary_search and friends do it... ...