|
|
Subscribe / Log in / New account

An interview with Larry Wall (LinuxVoice)

An interview with Larry Wall (LinuxVoice)

Posted Jul 15, 2015 15:31 UTC (Wed) by coriordan (guest, #7544)
In reply to: An interview with Larry Wall (LinuxVoice) by epa
Parent article: An interview with Larry Wall (LinuxVoice)

I don't read any purist position in that post. He said "dozens" is too much and perl 6 goes way too far. He didn't say programming languages should only have one way to do each thing.

I agree with what you say, but I don't see it as contradicting what you replied to.


to post comments

An interview with Larry Wall (LinuxVoice)

Posted Jul 16, 2015 9:46 UTC (Thu) by epa (subscriber, #39769) [Link] (7 responses)

The number of different ways to do something provided by a language also depends on what is included in 'the language'. The C language itself does not provide data structures such as linked lists or hash tables, or any input/output primitives. Once you add the standard C library you get the question of whether to use puts() or printf() - or sprintf() followed by puts(), and so on. Add a library for data structures and you then can choose whether to use a vector, a linked list, a tree... These combinations multiply together pretty fast to give easily 'dozens' of ways to achieve a fairly simple operation such as picking the top three integers from a sequence. With a higher-level language, more data structures and manipulation operations are part of the core language and the syntax tends to be more compact, so it is not a surprise to see many different ways to express even a single line of code.

Take Python as an example, often held up as a contrast to Perl. "There should be one obvious way to do it" is certainly a fine principle and one that Perl could sometimes take note of. But in Python too you can choose between lambdas, list comprehensions, explicit loops (of several types, with some interesting ways to break out of the loop); lists, dictionaries or perhaps tuples; and of course different ways to structure object-oriented code. Again there are easily dozens of ways to achieve a relatively simple operation. And this is a good thing.

I don't have experience with Perl 6 so I can't comment on details, but I will say that if the language includes more powerful tools like grammars, these obviously provide new ways to tackle a problem, and so several more "ways to do it".

An interview with Larry Wall (LinuxVoice)

Posted Jul 16, 2015 12:21 UTC (Thu) by coriordan (guest, #7544) [Link] (6 responses)

I think we were all in agreement on pretty much all of that from the outset.

An interview with Larry Wall (LinuxVoice)

Posted Jul 16, 2015 14:38 UTC (Thu) by raiph (guest, #89283) [Link] (5 responses)

juliank:
> A programming language ... [with] dozens of shortcuts and different ways to say the same thing ... [is an] abomination

epa:
>> there are easily dozens of ways to achieve a relatively simple operation [in lang x]. And this is a good thing.

An interview with Larry Wall (LinuxVoice)

Posted Jul 16, 2015 17:45 UTC (Thu) by coriordan (guest, #7544) [Link] (4 responses)

But we all know the difference between what "dozens" means in a perl context and in the context of practically every other language.

If anyone wants to be pedantic they can find thousands of ways to add two numbers in Python, but that doesn't change that someone saying "Perl goes too far" is not a "purist" opinion and that we know what they mean.

An interview with Larry Wall (LinuxVoice)

Posted Jul 16, 2015 22:06 UTC (Thu) by raiph (guest, #89283) [Link] (3 responses)

> But we all know the difference between what "dozens" means in a perl context and in the context of practically every other language.

Sure. As epa explained, there's no substantial difference in terms of what is used in practice by equally competent programmers, but in Perl's case it's an "abomination" and in the other it's "a good thing".

> saying "Perl goes too far" is not a "purist" opinion

Given the context of railing against alternate forms of expression, it sounds like a succinct definition of a purist opinion to me. You might want to look up the definition of purism, especially as it relates to a language.

An interview with Larry Wall (LinuxVoice)

Posted Jul 17, 2015 2:25 UTC (Fri) by coriordan (guest, #7544) [Link] (2 responses)

"Perl goes too far" means "I've no problem with languages going in that direction but if I had the choice I would rather go somewhat less far".

This is about as far as one can get from "purism".

An interview with Larry Wall (LinuxVoice)

Posted Jul 17, 2015 15:07 UTC (Fri) by raiph (guest, #89283) [Link] (1 responses)

Please don't confuse your words with others', even if you think you're paraphrasing them.

"I've no problem with languages going in that direction but if I had the choice I would rather go somewhat less far" is reasonable and clearly not purist. But those are your words, not juliank's.

juliank said "Programming languages ... should not have dozens of shortcuts and different ways to say the same thing". That's classic purism. That's what epa commented on. That's what I was following up on.

An interview with Larry Wall (LinuxVoice)

Posted Jul 17, 2015 17:03 UTC (Fri) by coriordan (guest, #7544) [Link]

> That's classic purism.

Well then we read his words very differently.


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