1,605 reputation
1719
bio website stuartmarks.wordpress.com
location California
age
visits member for 2 years, 3 months
seen Oct 9 at 6:11

Java and OpenJDK developer, Oracle Corporation. Twitter handle: @stuartmarks


Oct
3
awarded  Good Answer
Sep
30
awarded  Explainer
Sep
24
awarded  Autobiographer
Jul
13
awarded  Yearling
May
14
comment Is there any reason not to use Optional as a method argument in the case where you know the argument is something that may or may not be needed?
See my answer to a related Stack Overflow question. Briefly, Optional is intended primarily for return values that might be absent. Other uses are possible, of course, but are cumbersome and are likely poor style.
Mar
8
comment Type inference in Java 8
I don't know enough about .NET to say whether its delegates are similar to Java's functional interfaces. There are some similarities with Linq, but again I don't know enough about Linq to comment on the details. Functional interfaces have a single abstract method (they can have many default methods) and yes, a reference to an object that implements a functional interface is kind of like an O-O function pointer. (This is sometimes called a "functor".)
Nov
6
awarded  Populist
Aug
5
answered Which child process will inherit threads of parent process?
Jul
15
revised java8 wiki excerpt
Copied from Stackoverflow java-8 tag (maybe the tag here on Programmers should be java-8 instead of java8).
Jul
15
revised java8 wiki description
Copied from Stackoverflow java-8 tag (maybe the tag here on Programmers should be java-8 instead of java8).
Jul
15
suggested suggested edit on java8 tag wiki
Jul
15
suggested suggested edit on java8 tag wiki excerpt
Jul
13
awarded  Yearling
Jul
12
awarded  Nice Answer
Apr
17
comment Is a lambda expression something more than an anonymous inner class with a single method?
See also my answer that addresses the syntactic sugar question, though it's an answer to a different question: programmers.stackexchange.com/a/181743/59134
Apr
17
comment Is a lambda expression something more than an anonymous inner class with a single method?
What you said is incorrect. The semantics of lambda and anon inner classes are not exactly the same (though they are similar). Off the top of my head, the meaning of meaning of this changes; and anon inner classes always result in a new instance of an object, whereas a lambda might or might not.
Mar
8
awarded  Nice Answer
Mar
7
wiki created java8 description
Mar
7
wiki created java8 excerpt
Jan
8
comment Type inference in Java 8
(... continued) Given that the signature of compare is int compare(T o1, T o2) and T is MyClass it follows that a and b are of type MyClass. Actually it's a bit more complicated since the target type parameter is ? super MyClass. I'm not sure how we get from here to just MyClass. The inference algorithm might just take the bound of the wildcard. Finally, it then checks that the expression a.order - b.order works with MyClass and the target return type of int. It checks out, so we're done. All this is reasoning mostly within the current type system.