Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (494)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
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 2474 times)
0 Members and 1 Guest are viewing this topic.
Offline Breakfast

Senior Member




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 Member




<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 Member




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 Member





« 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 Member




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




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 Member




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


http://t-machine.org


« 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 Member




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.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Dwinin (19 views)
2014-09-12 09:08:26

Norakomi (54 views)
2014-09-10 13:57:51

TehJavaDev (63 views)
2014-09-10 06:39:09

Tekkerue (31 views)
2014-09-09 02:24:56

mitcheeb (53 views)
2014-09-08 06:06:29

BurntPizza (37 views)
2014-09-07 01:13:42

Longarmx (23 views)
2014-09-07 01:12:14

Longarmx (27 views)
2014-09-07 01:11:22

Longarmx (27 views)
2014-09-07 01:10:19

mitcheeb (35 views)
2014-09-04 23:08:59
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org 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‑gaming.org
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!