3 ms·
Perl is a fundamentally different approach to language design. It's almost anti-academic in the approach and more linguistic. It's superficially like any other
by bane 12y ago
Perl is a fundamentally different approach to language design.
It's almost anti-academic in the approach and more linguistic. It's superficially like any other curly braced language but there was lots of thought put into how statements are constructed and making things easy to humans to write rather than for computers to process. So it features all kinds of implicit actions and context sensitive approaches to the language and how it works. It's also an amalgamation of several preceding tools and ideas, and in that sense is almost an "English" of the programming world.
Perl is almost more of a human language than a programming language, and like any other human language, once you learn it and some dialects it makes all kinds of natural sense. Even if you're away from it for a long time it comes back like a second language does and you're up and running really quick. It feels less like programming and more like you're having a conversation with your computer friend.
Even small things that you get used to in Perl turn into huge pains in other languages, things like having regexes be a literal type (rather than trying to shoehorn the syntax into a string like in almost every other language) makes wanting to use them and using them second nature and really natural. Having a state machine you can type up in a few characters and be a first class citizen of the language is incredibly powerful.
Perl 6 is supposed to take these ideas and expand on them, lots of clever new language constructs and first-class grammars are exciting new promising notions. It'll be like going from the language a child speaks to the language an educated adult uses.
I'm concerned Perl 6 has missed it's window, but there's enough interesting stuff going on in the Perl 5 community and there's some really smart people working on it that I'm hopeful it'll be more than another language curiosity.
- zzzcpan 12y ago> It's almost anti-academic in the approach I'd say academic approach to programming languages is anti-scientific and therefore anti-academic on itself. They just don't realize it yet. > Perl 6 is supposed to take these ideas and > expand on them The problem is we already have lots of features in Perl 5 that nobody really needs, they just complicate things, raise entry cost, split community, make it impossible to address performance and deployment issues. So, approach on expanding feature set is flawed and frankly always was. Instead, Perl 7 maybe should get rid of all the unneeded features, restrict feature set, restrict coding conventions, make it easier for newcomers, make it easier for everyone to understand each other's code, make it faster, easy to compile and deploy without having to install interpreter and so on. These issues are much more important, than language features. And yet no one seems to understand that.
- weinzierl 12y agoI'm curious about the state machine you can type up in a few characters and be a first class citizen. Can you give or link to an example?
- zzzcpan 12y agoI believe he was talking about regular expressions being first class citizens in Perl: ($v1, $v2) =~ /a(b|c)d(e)/; (regular expressions are state machines)
- weinzierl 12y agoOk, I get that. I wrote simple state machines for simple parsing tasks and was just hoping there was an easier way.
- kbenson 12y agoOh, in Perl 6 there are, grammars[1]. [1]: http://en.wikibooks.org/wiki/Perl_6_Programming/Grammars http://en.wikibooks.org/wiki/Perl_6_Programming/Grammars