Hacker News new | ask | show | jobs
by Estragon 3735 days ago

  > There are some people who appreciate games that are very abstract and with
  > simple rules from which complex behavior emerges, such as a game like Go.
I love Go, but I despise perl. Perl is not built on "very abstract and simple rules. For instance, this code is quite hard to reason about:

    1: my @to-infinity-and-beyond = 0, 2 … ∞;
    2: say @to-infinity-and-beyond[1008];
    
    # OUTPUT:
    # 2016
This is self-indulgent mucking around. An inference procedure which goes from "0, 2 … ∞" to "the even-nonnegative integers" is bound to lead to unpleasant and hard-to-debug surprises.
4 comments

I'm confused. What's so hard to reason about that? It's very obvious that it prints 2016. Maybe "infinite lazy lists" isn't something that most mainstream languages consider, but honestly, they're very handy and hardly "self-indulgent mucking about."

(Though I'd probably use an asterisk instead of the infinity symbol)

Indeed, if we're going to hold up Haskell as an exemplar of simplicity—which, in its philosophy if not always in its implementation, I think it is—then we can hardly ding Perl for including lazy lists!
I have no problem with lazy lists. It's the "0, 2 ... \infty" expression which offends me.
What you consider "self-indulgent mucking around" others may call "declarative programming". I can appreciate that you don't like it, but I think you've missed my point.
The next sentence says:

> These people tend to be drawn towards programming languages that are built out of small pieces with a consistent philosophy from the ground up, such as lisp or Haskell.

If you like go and dislike perl its to his point.

A TLDR (because apparently); People who like games that are complex because of complex rules like perl. People who like complex games with simple rules dislike it.

GP was emphatically not saying that Perl 6 is the abstract and simple one. GP was saying those qualities apply to Go and are what make some personalities like Go more than P6. You like the Go qualities and not the P6 ones; QED.
Actually I was saying that those qualities apply to the _board game_ Go, not necessarily to the Go programming language.
He was talking about the GAME Go as compared to a complex game like Chess.