Live data from Hacker News

Every language fixes something - a DiGraph - just for fun

solipsys.co.uk

101–102 of 102 posts

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

#101
post #20

The line from Lisp to Ruby should go from Lisp to Perl - all the Lispy features Ruby has - as I understand it - were lifted via Perl...

I think the Lispy features were more derived Smalltalk than Perl...

Both Perl & Smalltalk provided lispy influences/features to Ruby. For eg. map & collect being same method (ie. aliases) - http://www.ruby-doc.org/core/classes/Array.html#M000249

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

#102

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.

Yes it can be confusing to a novice how Perl sigils work. Hence Larry Wall conceded this as an issue and so one of the reasons he went for invariant sigils in Perl6.

However there is logic in the madness. Perhaps Larry Wall/linguistic logic but none the less it does work! The best explanation i've see is the comment by "Matt S Trout" on devolving-sigils blog post (http://blog.fogus.me/2009/02/26/devolving-sigils/).

Below is the key sentence from mst comment:

  Actually, perl sigils don’t denote variable type 
  – they denote conjugation 
  – $ is ‘the’, @ is ‘these’, % is ‘map of’ or so 
  – variable type is denoted via [] or {}.
Post reply on HN