Live data from Hacker News

Every language fixes something - a DiGraph - just for fun

solipsys.co.uk

31–40 of 102 posts

Re: Every language fixes something - a DiGraph - just for fun

#31
post #28

Methinks it lacks "Pascal -> Need contracts -> Eiffel"

I won't add everything everyone suggests, that's just silly, but I've added that. The whole thing is intended as a bit of fun and not to be taken seriously, but I thought that was worth adding, not least because it improved the layout 8-)

Re: Every language fixes something - a DiGraph - just for fun

#32

Colin, would a reasonable implicit assumption be that if the problem being solved isn't a problem for me, then I should stick with the language in question? I mean, for e.g., if I don't care that Python's not OO enough, I don't need to know Ruby, right? Right?! p.s: in case it's not apparent, I will be using these graphs to justify some laziness on my part :)

There might be other reasons that are more important to you. e.g. if you've been using Modula-3, its syntax might be a reason to switch to Python, but in my mind, things like the iterator protocol and NumPy are better reasons. (Also, you've been asleep under a rock for fifteen years.)

In my case, I've been surprised at how much less syntactic overhead Ruby imposes than Python (despite the explicit "end"!), and how much it matters. Compare:

    def mouse_clicked
      x = mouse_x / @cellsize
      y = mouse_y / @cellsize

      if @cells[x][y] == :empty
        set x, y, :wire
      elsif mouse_button == LEFT
        set x, y, :empty
      else
        set x, y, :electron_head
      end
    end

    def mouse_clicked(self):
        x = processing.mouse_x() / self.cellsize
        y = processing.mouse_y() / self.cellsize

        if self.cells[x][y] is Empty:
            self.set(x, y, Wire)
        elif processing.mouse_button() == processing.LEFT:
            self.set(x, y, Empty)
        else:
            self.set(x, y, ElectronHead)
(Here ElectronHead and the like are assumed to be top-level empty classes in the module; the Ruby equivalent is a Lisp-style atom that doesn't need to be declared.)

To me, the Ruby version has a much higher signal-to-noise ratio.

Another thing: JRuby seems to be a lot more mainstream among Rubyists than Jython is among Pythonistas, which I think means it's a bit more solid.

Re: Every language fixes something - a DiGraph - just for fun

#36

Bullshit. Not to mean or anything. But bullshit. Most of the arrows are labelled with the author's post-hac, childish generalizations of language differences. JavaScript came from Java because of the scary syntax? No, it came from Scheme because of the scary syntax, Java's syntax was considered particularly comforting. There's no relation between Lisp and MacLisp. Lisp came from "Turing Machines"? Ruby came from Perl…

I think your complaints are mostly fixed in the second version.

Re: Every language fixes something - a DiGraph - just for fun

#37
post #3

The enhanced version is completely different from the regular version. Not only are the reasons different, but a lot of the languages don't even inherit from the same sources (the regular version had javascript coming from java. wtf?). Just goes to show how arbitrary/silly it all is. Still pretty awesome. Why did haskell come about? "Lazy evaluation is cool, yo."

fortran is apparently fixes machine code

It doesn't say it fixes it, it asserts that ForTran was created because people thought Assembler was too low level.

Not the same thing at all.

Re: Every language fixes something - a DiGraph - just for fun

#40
post #27

Javascript was developed to replace Java... do tell.

a. You're looking at the original, which is in PG's original essay. The second version doesn't have that link at all.

b. It's not talking about "developed to replace," it's talking about "was developed in response to a perceived problem."

Post reply on HN