Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re (tilly) 5: Efficiency in maintenance coding...

by tilly (Archbishop)
on Nov 15, 2001 at 04:55 UTC ( #125478=note: print w/replies, xml ) Need Help??

in reply to Re (tilly) 3: Efficiency in maintenance coding...
in thread Efficiency in maintenance coding...


Right now our Java solution hasn't yet figured out how to handle contractions yet. Perl is still ahead. Secondly why break out the sledgehammer when you don't have to?

foreach my $word ( sort { $freq_count{$b} <=> $freq_count{$a} or $a cmp $b } keys %freq_count ) { print "$word:\t$freq{$word}\n"; }
Most Perl programmers should understand this. Doing the same in Java, well probably somewhere in their maze of classes is one that naturally sorts in exactly the order you want. Good luck finding it, and good luck for the average Java programmer realizing why you chose this way of doing things.

And as for the maintainability of a Schwartzian Transform, it is a trick. If you think in a list-oriented way, or if you have ever really understood the tranform, then maintaining it when you see one is pretty easy. I understand it, and I try to ensure that people I train are able to handle list-oriented thinking. So it isn't a problem for me. But YMMV on its maintainability.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://125478]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2018-06-20 01:03 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (116 votes). Check out past polls.