Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (614)
Games in Android Showcase (173)
games submitted by our members
Games in WIP (659)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Anyone know any advantages of Perl?  (Read 2780 times)
0 Members and 1 Guest are viewing this topic.
Offline Breakfast

Senior Devvie

for great justice!

« Posted 2006-09-04 14:00:06 »

I'm doing some work with Perl at the moment and it's driving me totally mad. Who on earth thought that any of these features would make for a good language? How come it is so popular and successful?

Seriously, the namespaces, the way you make function calls, pretty much everything about the language is insane. It's like trying to knit yourself a car out of spaghetti. I'm guessing it's just that I'm accustomed to using languages that were designed by intelligent and sane people and there must be something good about it, but I can't for the life of me work out what.

Any suggestions?
Offline dishmoth
« Reply #1 - Posted 2006-09-04 14:37:43 »

Never used it myself, but I've worked with people in the past who were very fond of Perl.

The argument seems to be, if a task doesn't deserve to be coded in a proper language, then code it in Perl!  You can get Perl to do some pretty useful stuff in the time it takes a Java programmer to type "void main()".

But, no, not a language I have any desire to use myself.

Offline tortoise

Junior Devvie

<3 Shmups

« Reply #2 - Posted 2006-09-04 14:42:49 »

I enjoy Perl. I worked a job once where I had to write a complete maintenance system for website scrapers in Perl. It was my first exposure to the language. I walked away pretty damn good at it (although i haven't really touched Perl since then). Things to keep in mind:

-- it was never intended to be used for real apps, just scripting, text parsing, "glue code"
-- it wasn't intelligently planned out and developed, it grew like a weed and a lot of its features and hiccups are a result of that
-- for years and years it was the only game in town.

Perl gives you an obscene amount of freedom. As long as you don't abuse that freedom you can put together some nice scripts that are easy to maintain. It's the people that go insane on the shortcuts and clever way of doing things that produce scripts that are impossible to even figure out what they do.

And finally ... look to Ruby if you don't like Perl. It was originally intended to be a Perl replacement, but it's much better. Ruby is a gorgeous language.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Breakfast

Senior Devvie

for great justice!

« Reply #3 - Posted 2006-09-04 16:06:27 »

I do a lot of Ruby. Going to perl feels a lot like stepping out of my foundry and knocking flints together.

I think it's the namespacing thing that is doing my head in. The whole concept of things being global by default just does my nut in.
Offline BloodRain

Junior Devvie

« Reply #4 - Posted 2006-09-04 17:24:45 »

I don't know much about perl but I know is one of the strongest languages when it comes to strings.It's fast and has many  functions that makes string usage easier. That's the advantage..About the disadvantages ...

    Perl is worse than Python because people wanted it worse. Larry Wall (Creator of Perl), 14 Oct 1998

    I would actively encourage my competition to use Perl.Sean True, 30 Mar 1999

So I think Python might be a better choice .Bruce Eckel said that his favourite programming language is Python. Bruce Eckel is the writer of Thinking in C++ and Thinking in Java .(I saw something about thinking in Python , but I don't remeber if the book is already out). Python also has some good libraryes for writting games (Pygame,PyOpenGL) and it can be used with java using Jython(which is made 100% in java).

Offline oNyx

JGO Coder

Medals: 2

pixels! :x

« Reply #5 - Posted 2006-09-04 22:54:09 »

Python is pretty annoying, too. I use it for some things (the options were python and perl) and so far it has been a hairpulling experience. While python is imo the lesser of the both evils, it isnt any fun at all.

So, my advice is... check how good the documentation is before jumping into another language. Its a pretty good indicator how much fun (if any) it will be.

弾幕 ☆ @mahonnaiseblog
Offline Schabby

Junior Devvie

The Receding Brow Worm will eat your code!

« Reply #6 - Posted 2006-09-05 18:17:03 »

Python seems to be pretty successful with Civilization IV though...

Offline swpalmer

JGO Coder

Exp: 12 years

Where's the Kaboom?

« Reply #7 - Posted 2006-09-06 02:04:05 »

Perl is self-obfuscating and impossible to read by anyone but the original author, so it is safe to give out your source code directly... no need to worry about decompilers.

Offline Breakfast

Senior Devvie

for great justice!

« Reply #8 - Posted 2006-09-06 10:52:24 »

That is actually very accurate...

Half of what I'm doing is maintaining someone else's perl. I don't think it's particularly poor, but it's pretty hard to follow in places...
Offline blahblahblahh

JGO Coder

Medals: 1

« Reply #9 - Posted 2006-09-07 09:35:40 »

That is actually very accurate...

Half of what I'm doing is maintaining someone else's perl. I don't think it's particularly poor, but it's pretty hard to follow in places...

* blahblahblahh wagers it would take you less time to write a perl-to-C [or any other procedural you've got a decent IDE for - pascal might be easiest for perl?] (and back) round trip compiler, edit in eclipse, then recompile back to perl Tongue.

malloc will be first against the wall when the revolution comes...
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Breakfast

Senior Devvie

for great justice!

« Reply #10 - Posted 2006-09-07 10:46:43 »

If I wrote that in perl I would become so good at writing in the language that I wouldn't need to have written it.

At the moment it's the function calls that do my head in. You don't get named parameters, you just pass an array, so you call mySub( $a, $b $c ) and in mySub you just have a parameter array @_ containing $a, $b and $c. That is fine if you're passing single values but if one of your parameters is an array itself you end up having that as part of the parameter list so if $a was an array you would get $a[0]. $a[1], $a[2], $a[3], $b, $c as your input parameter.

I know there are workarounds and I'm sure it's mostly just something you need to get used to but it's very annoyingly confusing to start with.
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

Coldstream24 (15 views)
2015-09-03 00:41:28

Andrew_3ds (24 views)
2015-09-01 19:08:10

afikri (16 views)
2015-08-31 09:30:22

afikri (24 views)
2015-08-31 09:30:07

afikri (12 views)
2015-08-31 09:27:24

afikri (16 views)
2015-08-31 09:26:40

Roquen (23 views)
2015-08-29 11:30:54

GamerC4 (34 views)
2015-08-22 20:38:50

GamerC4 (32 views)
2015-08-22 20:37:18

GamerC4 (37 views)
2015-08-22 20:37:01
HotSpot Options
by Roquen
2015-08-29 11:33:11

Rendering resources
by Roquen
2015-08-17 12:42:29

Rendering resources
by Roquen
2015-08-17 09:36:56

Rendering resources
by Roquen
2015-08-13 07:40:51

Networking Resources
by Roquen
2015-08-13 07:40:43

List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!