Hacker Newsnew | past | comments | ask | show | jobs | submit | 2WSSd-JzVM's commentslogin

> An immigrant who makes money aggregating and selling Americans' personal information. Is there some way he can be deported?

As in, you don't want a law to make it illegal in general, you only want to ban immigrants from being data brokers?


As in, obviously this isn't the kind of person we should be allowing to immigrate here.

That example in article is straight up terrible. The Java version would be:

  var input = "Some kind of string.";  
  var output = Optional.of(input)
    .map(i -> i.trim())
    .map(i -> i.replace(' ', '-'))
    .map(i -> i.replaceAll("[./…]", ""))
    .map(i -> i.toLowerCase())
    .get();
That is until you realize there is no reason to go weird with arrow operators when String is an object:

  var input = "Some kind of string.";        
  var output = input.trim()
    .replace(' ', '-')
    .replaceAll("[./…]", "")
    .toLowerCase();
It looks like they solved the wrong issue but that is probably just side effect of using trivial examples.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: