Recent Articles


Handling Missing Data
I have an old Perl project that goes out to a Government web site, ftp's some files, massages them in various ways, and spits out some output. Over time, the project grew, and now does more than it used to. To keep it generic and simple, let's pretend that originally...

Help, My Script Isn't Working!
Here's a list of tips and tricks to consult at two a.m. when you're trying to put your site to bed and that d*mn script just won't work. 1. Make a note of the error message, and type it in Google. Leave out your unique paths and file names. Someone else has had the same problem...

Perl Loop Causes Strange Read-only Error
Ok, folks: I don't understand this. It must have something to do with anonymous arrays in Perl (no, it doesn't, I realize now), but I don't grok the connection. I ran into this in attempting a seemingly simple change in some customer's code; it wasn't hard to fix...

Whatever, Perl 6 Is On The Way
Larry Wall's recent State of the Onion address concerned Perl 6 and the concept of being prepared to do "whatever" in the context of the next version of the language. Government Computer News compared Perl 6 to "the ever-M.I.A. Duke Nukem computer game," and...

The Hidden Loop
Programmers use loops to avoid writing repetitive code, but sometimes forget that compilers will unroll their loops when possible for efficiency. You can unroll your own loops, too. Rather than testing and branching takes time; if you need flat out performance, you avoid...

01.09.07


A Perl And C# Comparison

By Paul Kinlan

A search that I have noticed that has been passed to my site was "perl c# comparison", I would assume that the person that asked this was trying to compare the languages and not how c# and perl perform comparisons.

My take on this would be that I don't really think that the two are even slightly similar in sytanx, semantics or even intended use.

The only thing that I have found in common is the use of the ";" to signify the end of the line.

• The OO implementation is not similar, C# is strictly Object Orientated, whilst I think that Perl was not and is not intended to be OO (I know a lot of people will disagree with me).

I just don't think Perl's OO functionality is that intuative, it is like Javascripts OO: Obtuse!

• C# has a very strict and highly developed Framework that can be used from the start, Perl has lots of modules that you have to install, by default though you would do everything yourself.

• The semantics in C# are stricter, that is you can may tend to do things in one way, other people would tend to do it the same way too.

In Perl at least it seems to me that you can do everything many many ways, which a lot of people like because one person doesn't code the same as another; it is not forced on you.

• Perl has Regex's built in to the language, in C# Regex's are an object that you construct etc.

Low Rate eCommerce & Retail Plans

I use perl because I can do a lot of work quickly in it, and my site is based on a Linux server.

I use C# because I like the langague and it is my job.

There are many more reasons that the languages are completly different. This was my take.

Comments

About the Author:
Paul Kinlan is the author of the popular C#, .Net Framework blog. Paul is an Analyst Developer working in Southport, England. Paul has several years experience developing and designing massively scalable enterprise systems on UNIX and Windows based architectures.


About PerlProNews
PerlProNews is a collection of news and commentary designed to keep you in step with the ever evolving landscape of Perl environments. News and Advice for Perl Professionals

PerlProNews is brought to you by:

SecurityConfig.com NetworkingFiles.com
NetworkNewz.com WebProASP.com
PerlProNews.com SQLProNews.com
SysAdminNews DevWebPro.com
LinuxProNews.com WirelessProNews.com
CProgrammingTrends.com ITCertificationNews.com


-- PerlProNews
is an iEntry, Inc. publication --
iEntry, 2549 Richmond Rd. Lexington KY, 40509
2007 iEntry, Inc.  All Rights Reserved  Privacy Policy  Legal

archives | advertising info | news headlines | free newsletters | comments/feedback | submit article



Database Forum News and Advice for Perl Professionals PerlProNews News Archives About Us Feedback PerlProNews.com About Article Archive News Downloads WebProWorld Forums iEntry Advertise Contact Jayde