Live data from Hacker News

Every language fixes something - a DiGraph - just for fun

solipsys.co.uk

51–60 of 102 posts

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

#51
post #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 mu…

I don't understand why you think the Ruby code has better SNR. The python code is two lines shorter. In python, you have to type the (), but that's not really "noise". I do hat the : at the end of python control statements. I always forget them, and it seems like the parser could do it's job just as well without them.

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

#54

PHP gets no love. Where would it be in the chart? coming off of C or C++?

When the people who "designed" PHP did so, why did they think no existing language would do the trick? What was the problem with all the existing languages? What problem were they trying to fix?

  Everything -> not bundled -> PHP
  Perl -> too weird -> PHP
It's hard to explain to a novice that in Perl 4/5, $x[42] dereferences @x, not $x (which are completely separate, except when they're not, due to *x). And PHP has a much more typical object system. I think we agree that most all of PHP's distinctive and non-mainstream design decisions have been bad ones, though.

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

#55
post #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 mu…

Hi there...experienced ruby guy here who is doing python work at the moment. The nice thing I find about python, even in its verbosity relative to ruby, is that I always for the most part know what it's doing. With ruby, the impulse to overload operators and create dsls mean that I have to learn a new language (potentially) with every new project or library I choose to use. It's not immediately clear what code is really doing. With python, it usually is. Just my (quick) two cents.

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

#56
post #43

Earlier quoted context omitted.

>"was developed in response to a perceived problem." It wasn't this either. https://secure.wikimedia.org/wikipedia/en/wiki/Javascript#Hi... I'm just taking the piss anyway, the whole chart is silly. Cheers!

Your reference seems to miss the point. The question is - what was wrong with existing languages? Why was JavaScript developed instead of using an existing language? What problem was it trying to fix?

Javascript was not created to "fix Java's 'scary syntax'"!! Java applets were self-contained features embedded in a webpage whereas javascript– argh! Why are we having this discussion!? :p

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

#57
post #56

Earlier quoted context omitted.

Your reference seems to miss the point. The question is - what was wrong with existing languages? Why was JavaScript developed instead of using an existing language? What problem was it trying to fix?

Javascript was not created to "fix Java's 'scary syntax'"!! Java applets were self-contained features embedded in a webpage whereas javascript– argh! Why are we having this discussion!? :p

Have you not noticed that the "enhanced" version doesn't have an arrow between the two? You're still arguing about PG's original ...

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

#59

Earlier quoted context omitted.

When the people who "designed" PHP did so, why did they think no existing language would do the trick? What was the problem with all the existing languages? What problem were they trying to fix?

Everything -> not bundled -> PHP Perl -> too weird -> PHP It's hard to explain to a novice that in Perl 4/5, $x[42] dereferences @x, not $x (which are completely separate, except when they're not, due to *x). And PHP has a much more typical object system. I think we agree that most all of PHP's distinctive and non-mainstream design decisions have been bad ones, though.

> It's hard to explain to a novice that in Perl 4/5, $x[42] dereferences @x, not $x (which are completely separate, except when they're not because of (star)x).

(I don't know how to protect the star from starting an emphasise block. Escaping it doesn't seem to work.)

Sorry to nit-pick, but these may be particularly hard to explain because they're not true.

$x[42] isn't a de-reference at all, but an indexing. (Granted, it's more than a little confusing that it's indexing @x. This is 'fixed' in Perl 6.) $x->[42] is a de-reference, but of $x, not of @x (which isn't a reference anyway (I think unlike in Ruby)). @x and $x are always completely separate; typeglobs allow you to say something like (star)x = \@y, whereupon @x and @y are the same (but still $x and @x are completely different). I suppose you could claim that $x and @x are no longer completely different if you say something like $x = \@x, whereupon $x->[42] and $x[42] mean the same thing.

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

#60
post #55
post #32

Earlier quoted context omitted.

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 mu…

Hi there...experienced ruby guy here who is doing python work at the moment. The nice thing I find about python, even in its verbosity relative to ruby, is that I always for the most part know what it's doing. With ruby, the impulse to overload operators and create dsls mean that I have to learn a new language (potentially) with every new project or library I choose to use. It's not immediately clear what code is rea…

Yes, I think the verbosity I'm complaining about above is the fruit of three of the principles of the Zen of Python:

Explicit is better than implicit.

Errors should never pass silently.

Namespaces are one honking great idea -- let's do more of those!

Maybe after I spend more time with Ruby, I'll see the dark side of DSLs, but so far I'm loving it :)

Post reply on HN