CLR implementation of virtual method calls to interface members

That article is more than 10 years old, and a lot has changed since then. IVMaps have now been superseded by Virtual Stub Dispatch. Virtual stub dispatching (VSD) is the technique of using stubs for virtual method invocations instead of the traditional virtual method table. In the past, interface dispatch required that interfaces had process-unique … Read more

Passing single object vs. passing multiple parameters

Method A (naked parameters) always has the advantages that it requires the method author to type less, since they don’t have to implement a Parameter Object, it requires the method caller to type less, since they don’t have to instantiate a Parameter Object it performs better, since no Parameter Object has to be constructed and … Read more

Check if returned value is not null and if so assign it, in one line, with one method call

Same principle as Loki’s answer but shorter. Just keep in mind that shorter doesn’t automatically mean better. dinner = Optional.ofNullable(cage.getChicken()) .orElse(getFreerangeChicken()); Note: This usage of Optional is explicitly discouraged by the architects of the JDK and the designers of the Optional feature. You are allocating a fresh object and immediately throwing it away every time. … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)