Post #178,319
10/7/04 6:36:09 PM
|
Agree its a mistake
"Personally I think that context is a design mistake."
I'm coming to strongly dislike implicit anything in programming languages.
Implicit type conversions and object copying are the leading cause of unexpected behavior (bugs) in C++.
But we have perl everywhere here so I'd better come to grips with it.
That was lovely cheese.
--Wallace, The Wrong Trousers
|
Post #178,325
10/7/04 6:45:32 PM
|
Same here.
I've come to despise implicit behavior. Implicit build options, implicit languages. Bleh. Fine when I'm by myself (sometimes), but not in a group of people who may or may not know what they're doing.
Regards,
-scott anderson
"Welcome to Rivendell, Mr. Anderson..."
|
Post #178,327
10/7/04 6:56:48 PM
|
Right
But Perl has critical mass, CPAN is wonderful, there are lots of jobs using it, I know it well and I have a reputation for knowing it well.
That's worth some warts to me.
Cheers, Ben
I have come to believe that idealism without discipline is a quick road to disaster, while discipline without idealism is pointless. -- Aaron Ward (my brother)
|
Post #178,350
10/7/04 10:02:43 PM
|
Shame about the inertia. Python's design is "least surprise"
But even *that* doesn't stop a few surprises in the first couple of days working with it. ;)
|
Post #178,359
10/7/04 10:53:12 PM
|
When I started with Perl...
Python had some major design mistakes. Like lack of lexical scoping. Most of those have now been fixed, but the result is that the language has been more in flux than Perl has. (Though Perl 6 will be an even bigger break for the Perl community.)
I've looked at Python. I see no compelling arguments for me to use it. I've known lots of people who've tried both it and Perl extensively. Many prefer it to Perl, many prefer Perl to it. That seems to be a matter of taste. I prefer to avoid arguments about taste unless there is a more important issue lurking.
The features that I value that Perl has which Python doesn't are CPAN, strict.pm, and taint checking. Python is working on its equivalent to CPAN. What strict.pm does is catch most of my typos. It is nice having a typo checker in Perl, though honestly most of the typos that it catches are slip-ups in syntax. (eg I'll write $foo{bar} when I meant $foo->{bar}.) I often don't care about taint checking, but when I do I'd really feel the lack.
I'm sure that if I used Python a lot I'd have a list of features that Python has which Perl doesn't. I suspect that it would also not be a long list, and most of the items are ones that I could survive without.
And so it remains, the only scripting language that I've encountered that I really prefer to Perl is Ruby. I don't use it because it is easier for me to be employed programming Perl. Therefore I'm always rusty. But even so, there are times (particularly when I want to play with big numbers) that I'll reach for Ruby.
Cheers, Ben
I have come to believe that idealism without discipline is a quick road to disaster, while discipline without idealism is pointless. -- Aaron Ward (my brother)
|
Post #178,383
10/8/04 1:53:55 AM
|
On Perl 6
Would you mind posting a one-page simpleton's summary of what's new and shiny and different in Perl 6?
I use Perl as a kind of Turbo Awk On Steroids, so I imagine that it'd have to change fairly drastically for me to notice much.
Peter [link|http://www.debian.org|Shill For Hire] [link|http://www.kuro5hin.org|There is no K5 Cabal] [link|http://guildenstern.dyndns.org|Blog]
|
Post #178,409
10/8/04 8:37:56 AM
|
Re: On Perl 6
OK, so it ain't one page. It ain't anywhere CLOSE to one page. Matter of fact, it's the closest I can find to The Whole Shebang: [link|http://dev.perl.org/perl6/apocalypse/|Larry Wall's Apocalypses].
-YendorMike
"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." - Benjamin Franklin, 1759 Historical Review of Pennsylvania
|
Post #178,462
10/8/04 12:54:37 PM
|
I had a nice response to this typed up
And then I visited [link|http://www.msnbc.msn.com/id/6205119/|http://www.msnbc.msn.com/id/6205119/] and Galeon locked up on me. Gah. So you're getting the really short version. Some things are just plain different. For instance method calls are . rather than ->, you write %foo{$bar} rather than $foo{$bar}, a few operators changed, etc. Most of the changes make the language less surprising for people who are learning it. Perl regular expressions now have facilities for flexibly capturing lots of information about the match. You also can build them up from small pieces. This has all been carefully designed so that you can write something that looks a lot like a BNF grammar and you'll get a regular expression that actually parses that grammar. (It is only a recursive descent parser though.) These complex regular expressions are known as (surprise, surprise) grammars. Perl 6's grammar will be a Perl 6 grammar. This grammar will be available to play with, and can be overridden on the fly (this is the upside of a recursive descent parser - you can play these games). This is expected to replace the games that (some) people play today with source filters. There are many small improvements. For instance: \n# multi-way comparisons now work\nif (1 < $x < 10) {\n ...\n}\n\n# Sometimes you don't need parens where you once did.\nif 1 < $x < 10 {\n ...\n}\n\n# I used it, but didn't point out that this is the\n# "TBD" operator. It is legal Perl but throws an\n# exception if it executes.\n...\n\n# The print here syntax has some new tricks.\n print <<EOT;\n And we write some text here using the\n "print here" syntax. Note that leading\n whitespace will be stripped to the EOT\n marker, letting us maintain code indentation\n but easily output a block of text that isn't\n indented.\n EOT\n\n# Pipelines let us write code top to bottom where\n# previously it was bottom to top. Compare a\n# Schwartzian transform in Perl 5:\nmy @shortest_first # 5\n = map { $_->[0] } # 4\n sort { $a->[1] <=> $b->[1] } # 3\n map { [ $_, $_->height ] } # 2\n @animals; # 1\n# with one in Perl 6:\n@animals # 1\n ==> map { [ $_, .height ] } # 2\n ==> sort { $^a[1] <=> $^b[1] } # 3\n ==> map { $_[0] } # 4\n ==> my @shortest_first; # 5\n\n# Junctions let you write code like this:\nif any(@these) > all(@those) {\n print "These have the largest element\\n";\n}\n Perl 6 has a much richer object system. It adds lots of goodies for those who like functional programming. Named arguments to functions. And a swarm of smaller improvements. Cheers, Ben
I have come to believe that idealism without discipline is a quick road to disaster, while discipline without idealism is pointless. -- Aaron Ward (my brother)
|
Post #178,588
10/9/04 2:53:04 AM
|
Many thanks for that
It was the really short version that I wanted :-)
[Obsequious note: you're getting (noticeably, over the past 18 months or so) very good at this sort of thing - *fawn*]
Peter [link|http://www.debian.org|Shill For Hire] [link|http://www.kuro5hin.org|There is no K5 Cabal] [link|http://guildenstern.dyndns.org|Blog]
|
Post #178,458
10/8/04 12:46:50 PM
|
We're having a little brown bag on Ruby
today with Dave Thomas, author of "Programming Ruby: A Pragmatic Programmer's Guide".
I'm looking forward to learning something about it.
That was lovely cheese.
--Wallace, The Wrong Trousers
|
Post #178,739
10/11/04 6:55:34 AM
|
Re: We're having a little brown bag on Ruby
We're having a little brown bag on Rubytoday with Dave Thomas, author of "Programming Ruby: A Pragmatic Programmer's Guide".
Given that the today referenced above was Oct 8, and [link|http://www.robotcoop.com/weblog/24/dave-thomas-talks-about-ruby-at-amazon|this], am I right in assuming you are part of the Amazon crowd? Cool.
So, what were your impressions of the talk?
-- -- Jim Weirich jim@weirichhouse.org [link|http://onestepback.org|http://onestepback.org] --------------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)
|
Post #178,740
10/11/04 7:36:30 AM
|
Shhh! Anonymous Todd works at some other...
...outfit entirely, that he calls only "BigRiverBooks"; I haven't the *faintest idea* what could be meant by that.
[link|mailto:MyUserId@MyISP.CountryCode|Christian R. Conrad] (I live in Finland, and my e-mail in-box is at the Saunalahti company.)
Your lies are of Microsoftian Scale and boring to boot. Your 'depression' may be the closest you ever come to recognizing truth: you have no 'inferiority complex', you are inferior - and something inside you recognizes this. - [link|http://z.iwethey.org/forums/render/content/show?contentid=71575|Ashton Brown]
|
Post #178,771
10/11/04 12:55:46 PM
|
I might have been there
I was "the" guy who raised his hand when asked if anyone knew anything about WebObjects.
I thought the talk was rather good (in that Thomas is definitely a "fun" speaker) from an introduction perspective. The bogging down in what is and is not "strong typing" from "those who do not get it" was a bit of a drag. I thought Thomas handled it well by simply caving on the point and moving on.
I would have liked to see more rails examples. That's the kind of development we do so that would have been the most interesting to our crowd.
That was lovely cheese.
--Wallace, The Wrong Trousers
|
Post #178,774
10/11/04 1:14:57 PM
|
Re: I might have been there
Dave certainly is ranked near the top of my list of speakers to listen to.
I would have liked to see more rails examples. That's the kind of development we do so that would have been the most interesting to our crowd.
I've done one simple Rails app (demo at [link|http://onestepback.org:3030|http://onestepback.org:3030]). It took a couple of evenings to throw together. Source code is in the CVS repository at [link|http://rubyforge.org/projects/storycards|http://rubyforge.org/projects/storycards] (however, keep in mind this was my first Rails project and I certainly did some things the hard way).
Rails is certainly getting a lot of attention right now. David Heinemeier Hansson's talk at [link|http://www.rubycentral.org/conference/|RubyConf(2004)] was one of the most anticipated talk of the conference.
-- -- Jim Weirich jim@weirichhouse.org [link|http://onestepback.org|http://onestepback.org] --------------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)
|
Post #178,464
10/8/04 1:02:20 PM
|
Re: strict -- have you seen pychecker?
[link|http://pychecker.sourceforge.net|http://pychecker.sourceforge.net]
The Sig: "Despite the seemingly endless necessity for doing so, it's actually not possible to reverse-engineer intended invariants from staring at thousands of lines of code (not in C, and not in Python code either)." Tim Peters on python-dev
|
Post #178,466
10/8/04 1:08:02 PM
|
No I hadn't, thanks
In fact that looks better than strict.pm.
Cheers, Ben
I have come to believe that idealism without discipline is a quick road to disaster, while discipline without idealism is pointless. -- Aaron Ward (my brother)
|