polygenelubricants

less info
338 reputation
28
bio website polygenelubricants.com
location Como, CO
age 93
visits member for 1 year, 10 months
seen Aug 9 '11 at 7:26
stats profile views 32

I mostly contributed in [java] and [regex] from February to August of 2010. I work for Palantir Technologies now, so I may not have much time on stackoverflow as I did then.

We're currently hiring; you can e-mail me for a referral.


A few habits I've developed on the site:

  • I will no longer cast a downvote. It will stay at 54 forever.
  • I don't like to engage in dramas on stackoverflow. If you really need to discuss politics and other non-technical issues with me, bring it to meta.
  • I delete my comments once they've become obsolete
  • I try to revise my answers periodically, so I prefer that you leave comments and feedbacks instead of editing my answers directly.

Jul
17
comment What are the pros and cons of having a CaseInsensitiveString type in Java?
I don't buy this "depends on the context" pov. You can say that there's no point of using generics for type safety by declaring a List<String> or a List<Integer>, because the type of objects that the list contains depends on how you use it, and not the property of the list itself (which of course, is not a very defensible claim). Besides, arguing that it depends on the context actually makes the case stronger for making this property intrinsic and invariant of the type, because it's so much simpler precisely when you DON'T care about the context.
Jul
6
comment What are the pros and cons of having a CaseInsensitiveString type in Java?
So would you recommend a TreeSet<String> using String.CASE_INSENSITIVE_ORDER over a HashSet<CaseInsensitiveString>? Note that using TreeSet means O(log n) for contains. Moreover, this comparator is inconsistent with equals, meaning that the resulting TreeSet doesn't obey the general Set contract (i.e. it may contains(x), even though it has no element that is equals to x).
Jul
6
comment What are the pros and cons of having a CaseInsensitiveString type in Java?
Potential concerns: space, need for interning, performance, garbage collectibility, etc.