Live data from Hacker News

Execution in the Kingdom of Nouns (2006)

steve-yegge.blogspot.de

21–30 of 73 posts

Re: Execution in the Kingdom of Nouns (2006)

#21

Earlier quoted context omitted.

CLOS is really required in about 5% of very specialized tasks, such as simulations.

I'm not sure - "simple" CLOS is really pretty simple and arguably works in a more intuitive way than most OO environments. However, if you do want more sophistication, as with most of Lisp, taking the Red Pill of the MOP can take you as deep as you want to go.... [Damn - I really need to do some more Lisp development]

I would agree with this... basic defgeneric/defmethod/defclass work is straightforward. It's when you start with the advice partial methods and the MOP that things get... exotic.

(I read the AMOP earlier this year and I'm pretty sure I haven't recovered from that mind bender).

Re: Execution in the Kingdom of Nouns (2006)

#22
post #18

This is a real classic. As someone who had only done imperative programming before reading this it really inspired me to give FP a try and led me down the road to trying Scala and then Haskell. However a year into this adventure, I still prefer "nouns". I think the human brain really does work imperatively for most logical problems. I can't deny that for a single problem the functional solution is often more " beauti…

I think you've mistaken Yegge's point if you see it as "Declarative functional languages are better than imperative ones." It's more about how the version of OO embodied in Java warps your program designs in an awkward way. He presents functional languages as the antithesis of this because, well, they are. But it's certainly possible for an imperative language to put functions and data on the same level — Yegge's favorite language, JavaScript, is an imperative language that does this.

Re: Execution in the Kingdom of Nouns (2006)

#23
post #11

Earlier quoted context omitted.

This is why the fundamental operation in the land of the verbs is composition: do this then do that. It turns out that composition is such a useful idea that we want more of it, which is where categories, monads and arrows come in. The most obvious type of composition for functions is, well, function composition. In math we define the composition of functions f and g as f(g(x)), usually written as f ∘ g. We can write…

Your explanations of Haskell concepts have been impressing me lately. Do you write elsewhere?

of course he does. every Haskell programmer has a blog. some have several.

Re: Execution in the Kingdom of Nouns (2006)

#25
OOP goes bad when you take a centralized design and nominalize the verbs, yes. It's more fun to think in terms of trained animals: "Trash, go empty yourself outside."

    TrashBag >> emptyInto: vessel
      |here| here := self place.
      self go: vessel place.
      vessel add: self spill.
      self go: here
This seems just as reasonable as the English he wrote. (I like functional programming too.)

Re: Execution in the Kingdom of Nouns (2006)

#27

Too long. An idea could be stated in a few sentences.) Java: This is an instance of an mammal of an animal kingdom which doesn't include dolphins and whales, which has a..., placed within the instance of a class Plain of polymorphic shape which has some private attributes... ML-family: This is a member of a set of only mammals of animal kingdom, excluding dolphins and whales, of small size, which has a..., located on…

Lisp:

(sat(mat preposition(article 'cat ('the))))

Re: Execution in the Kingdom of Nouns (2006)

#28
post #18

This is a real classic. As someone who had only done imperative programming before reading this it really inspired me to give FP a try and led me down the road to trying Scala and then Haskell. However a year into this adventure, I still prefer "nouns". I think the human brain really does work imperatively for most logical problems. I can't deny that for a single problem the functional solution is often more " beauti…

I would strongly suggest you give Erlang a try. It is a fairly pure functional language, but very very simple. You don't have to user the concurrency distributed parts.

I think this is actually an important thing that is missed when functional languages are touted as the next-big-thing we are always talking about Scala and Haskell. When we go learn either of these languages you climb a steep ladder into a world of very sophisticated type systems and this becomes the focus of our discussion of functional programming.

Alas, I fear we lose the most powerful lessons that functional programming has to give us.

1: Code operating on immutable data-structures is often really easy to reason about effectively

2: Recursion is a really great way to think about programming

3: Functions are wonderful when you can pass them around like data

The type systems in Haskell and Scala, not to mention the venerable Ocaml, are amazing and powerful. But I think they are often a distraction from the core benefits that a functional code base provides.

Re: Execution in the Kingdom of Nouns (2006)

#29
It's funny that this is so popular, because I think it is probably the single most counterproductive thing written about software ever. Seriously.

As far as I can tell, the only point of speaking about the poor oppressed "verbs" is to screw up the thinking of the reader, making the reader feel sorry for them. It seems to have worked in some cases, but is there some other reason for it?

But what really annoys me is that the author is an illiterate. He doesn't know what nouns and verbs are. He says nouns don't do much, but of course its only nouns that do things; verbs are what nouns do. How can anyone read this without wanting to point out to the author that functions are nouns?

The only substance to his complaint is that Java seems unnecessarily verbose. Because some objects are one-trick ponies, it seems unnecessary to say "call" or "execute" or "doit", when that can be implied. But calling a function is calling a function, whether your language uses the word "call" or not. It is only because a function is a noun that it makes sense to use a function itself (rather than its output) as argument to another function or as a return value. You can use the function as an object precisely because the function itself is something different from calling (or if you prefer "executing" the function.

Re: Execution in the Kingdom of Nouns (2006)

#30

It's funny that this is so popular, because I think it is probably the single most counterproductive thing written about software ever. Seriously. As far as I can tell, the only point of speaking about the poor oppressed "verbs" is to screw up the thinking of the reader, making the reader feel sorry for them. It seems to have worked in some cases, but is there some other reason for it? But what really annoys me is th…

The common complaint is that he's ok, but needs an editor. However, he is an awful writer. An honest editor would tell him to give up.
Post reply on HN