LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Re: unison

[ILUG] Re: unison

Fergal Daly fergal at esatclear.ie
Mon Feb 14 20:53:13 GMT 2000


At 09:55 14/02/00 +0000, John McCormac wrote:
>"John P. Looney" wrote:
>> 
>> On Sat, Feb 12, 2000 at 01:27:27AM +0000, Fergal Daly mentioned:
>> > use IO::Socket;
>> >
>> > $socket = IO::Socket::INET->new(
>> >         PeerAddr => "ntp.maths.tcd.ie",
>> >         PeerPort => 13,
>> > );
>> >
>> > exec "/usr/bin/date -s ".<$socket>;
>> 
>>  Meep. I think it shows that TCL really looks prettier.
>
>Yep and it displays more robustness (as in the hacker purity test
>question: programming at n hrs while pissed - did it make sense the next
>morning?) :-)

Nobody asked for pretty! Anyway, I'll take = over puts, gets and set any day.

I love the NAME => VALUE function call syntax, it's becoming more common
for perl modules and in terms of understanding what you were doing in a
drunken stupor last night which would you prefer, a self commenting
function call or something that takes n arguments and gives no hints as to
what order they're meant to be in or what they mean? It also allows you to
leave out stuff and accept the defaults, eg the above defaults to tcp, but
adding Proto => 'udp' makes this a udp socket and so it runs even quicker now.

Of course this applies to a lot more languages than tcl and there are
plenty of perl modules which still doing things the old way too. Programs
would be a lot easier to get right first time and far more readable if this
syntax could be adopted for anything with more than 3 or 4 arguments,

Fergal






More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell