|
|
Subscribe / Log in / New account

An interview with Larry Wall (LinuxVoice)

An interview with Larry Wall (LinuxVoice)

Posted Jul 16, 2015 15:24 UTC (Thu) by marcH (subscriber, #57642)
In reply to: An interview with Larry Wall (LinuxVoice) by epa
Parent article: An interview with Larry Wall (LinuxVoice)

> but normally it is better to use both ways of communicating,

Absolutely. It is difficult because programming languages must be both completely unambiguous (unlike Perl) and help humans to understand code *as well*. Not just one or the other.

The (successful) approach to square this circle and make code easier for humans *without* helping ambiguities, corner cases and bugs is: higher level of abstractions and mathematics. Not natural languages. Yes this means that programmers with a mathematical and scientific background and/or taste (rather than... linguists) make better programmers. How's that new?


to post comments

An interview with Larry Wall (LinuxVoice)

Posted Jul 16, 2015 15:50 UTC (Thu) by epa (subscriber, #39769) [Link] (4 responses)

Any programming language is unambiguous, and that includes Perl. The problem may be that the rules to decide the meaning of a program may be too complicated and hard for humans to remember - so in Perl, the { character can be the start of a block of code, or the start of an anonymous hash, and while in principle the choice is unambiguous, in practice the rules used are complex and hard to predict unless you are intimately familiar with the parser. Fortunately, if the wrong choice is made then it will be a syntax error, so there isn't in practice a problem of writing and running a program with the 'wrong' semantics.

Most of the syntactic sugar in Perl or any language (like having both 'for' and 'while', or having both 'if' and 'unless') does not introduce any ambiguity or uncertainty about how a program will be parsed and executed.

An interview with Larry Wall (LinuxVoice)

Posted Jul 16, 2015 16:02 UTC (Thu) by marcH (subscriber, #57642) [Link] (3 responses)

> Any programming language is unambiguous, and that includes Perl.

Quote from this nice and short interview of an incredibly smart person:

> Arguably in Perl 1 through to 5 we didn’t manage it quite adequately enough. Sometimes the computer was confused when it really shouldn’t be. With Perl 6, we discovered some ways to make the computer more sure about what the user is talking about, even if the user is confused about whether something is really a string or a number.

"...discovered some ways to make more sure even if the user is confused"?! Bye Perl!

An interview with Larry Wall (LinuxVoice)

Posted Jul 16, 2015 17:52 UTC (Thu) by raiph (guest, #89283) [Link]

Larry wasn't talking about how confusing Perl is or isn't.

What Larry was talking about was the concepts that A) sometimes coders are confused (this is true in any language) and B) it's a good thing to provide better error messages (this is also true in any language) and that Perl 6 is better able to provide better error messages when a coder is confused.

An interview with Larry Wall (LinuxVoice)

Posted Jul 17, 2015 9:04 UTC (Fri) by epa (subscriber, #39769) [Link]

I understood that to be referring to dynamic typing where the same value can be interpreted as either a string or a number. That is the way Perl works - polymorphic values but monomorphic operators (so that there are separate operators for string equality and numeric equality). But Larry's remark is purposely quite vague so it could be referring to several things.

An interview with Larry Wall (LinuxVoice)

Posted Jul 18, 2015 19:15 UTC (Sat) by flussence (guest, #85566) [Link]

> "...discovered some ways to make more sure even if the user is confused"?! Bye Perl!

I believe this is referring to design decisions like $a + $b producing either a number or helpful type mismatch error message, whereas in the language holding the front of the web together, addition is a non-commutative operator and also "grapefruit" is a legal return value.

Maybe with a little education you'll be offended at the right languages?

An interview with Larry Wall (LinuxVoice)

Posted Jul 16, 2015 17:39 UTC (Thu) by raiph (guest, #89283) [Link] (2 responses)

> programming languages must be both completely unambiguous (unlike Perl)

Perl 6's grammar is defined in terms of Perl 6 Rules (https://en.wikipedia.org/wiki/Perl_6_rules) which are PEGs (https://en.wikipedia.org/wiki/Parsing_expression_grammar) which "can not be ambiguous". Were you talking about Perl 5 or are you imagining that the Perl 6 grammar is not completely unambiguous?

> programmers with a ... scientific background and/or taste (rather than... linguists)

"Linguistics is the the scientific study of ..." (from https://en.wikipedia.org/wiki/Linguistics). You are presenting a false dichotomy.

> make better programmers

Please cite non-controversial scientific evidence for this claim.

Also, I'm curious; do you self-identify as having a mathematical or scientific background and/or taste and as being a better programmer?

An interview with Larry Wall (LinuxVoice)

Posted Jul 16, 2015 17:48 UTC (Thu) by juliank (guest, #45896) [Link] (1 responses)

Well, Philosoph is a "science" too.

But in practice...

An interview with Larry Wall (LinuxVoice)

Posted Jul 17, 2015 12:35 UTC (Fri) by Wol (subscriber, #4433) [Link]

Actually, it's the other way round. Science is a subset of Philosophy.

But then, unless you have at least some clue as to why it makes sense to argue how many angels can dance on the head of pin - I did know, but have forgotten - you're likely to dismiss Philosophy as irrelevant. Unfortunately, mathematicians and scientists have specialised so much, they've forgotten where their disciplines came from.

(Newton was a "Natural Philosopher" - he dabbled in maths, physics, alchemy, medicine, the lot. They hadn't invented those disciplines back then :-)

Cheers,
Wol


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds