Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
Perl

Journal Shadow Wrought's Journal: Ask /. : Perl v. C++ 28

I have mentioned in the past a desire to learn coding. Indeed it is even listed on my little bio (along with metal casting and glassblowing) as one of the skills that I'd like to acquire one of these days. Yesterday our local community college catalogue came out with their "Community Education" catalogue. Courses for folks, like me!, who have jobs and lives and can't attend school during the day. Low and behold, they are offering some, well, to be precise four, basic programming classes (for the absolute beginner no less;-), and I am going to enroll in one of them. The courses and my thoughts on them are listed below, but any thoughts from those mroe knowledgable in this area would be appreciated.
  • C# Programming for the Absolute Beginner
    Advantage: Works great for making slick and easy windows programs and I use XP at home.
    Disadvantage: As I understand it this is a very Windows-centric language and I would prefer to learn something that I can also use on Linux or BSD.
  • C++ Programming for the Absolute Beginner
    Advantage: One of the main things I want to do with coding is make a game or three. I have a couple ideas that I think would be a lot of fun and, as I udnerstand it, C++ is the main language used for gaming.
    Disadvantage: For starters I'd have to kick down an extra $70 or so for the Borland Compiler suite- unless I can obtain a copy of it from a friend of mine or make different arrangements with the teacher. While it is more cross-platform than C# I think it still requires considerable skill to code for different OS's.
  • SQL: Level I
    Advantage: While we do get in the occasional Access database, and this would be useful for dealing with it, we don't use Access all that much.
    Disadvantage: Most of the database work I do is in Concordance which, in addiiton to being a kick-ass litigation-centric database, is relational in nature. So I just don't know how useful SQL would be. I'd also need to ahold of either a database or SQL Server.

  • Perl Programming: Level I
    Advantage: This will likely help with the occasional work project when it would be nice to manipulate different datasets. The requirements are also free and it works across platforms. Finally, and again this is based off of my admittadly ignorant understanding, Perl habits can be used in Python as well; the language I was originally going to try and learn.
    Disadvantage: I don't know that there's a whole lot of Perl games out there;-)

Finally, I realize that programming is something that can be learned via tutorials and books, but, frankly, unless I have that class providing deadlines and instruction, I will simply keep putting it off. So it is simply not for me. A this point, I am leaning towards Perl being the best of the best of the bunch. It will be useful for work, I can get my feet wet, and I can always go back and learn something else later on. C++ is second because it is such a powerful language and I could learn it well enough to actually code some games. The other two just don't really appeal, but if you can make a good argument, I would certainly reconsider.

In advance I thank you for your thoughts;-)

This discussion has been archived. No new comments can be posted.

Ask /. : Perl v. C++

Comments Filter:
  • C#: Despite what Microsoft says, C# and .NET aren't exactly setting the world on fire. Plus, if you're wanting to write a game, yes, there's Managed DirectX, but... yuck.

    SQL: Only for databases.

    Perl: Scripting language. Interpreted. In other words, it's "slow", like C#. (But, RG, aren't you going to write jcrpg in Java now? Yes, because it's a frickin RPG, where I don't care about speed as much as I would if I were writing Doom 4.)

    C++: Object oriented, can still drop down to assembly if required.

    Que

    • Thanks! Its nice to know that C++ is actually not terribly difficult to port. I think the consensus is that I should go the C++ route. Now I just have to find out if I can do it using a free compiler.
  • Don't do perl. Its a script language that is tough to read and maintain. If you want a good language to start from, I'd say go with C++. C# would be easier (don't have to worry about references and such), but C++ is definately the one I'd go with.
    Don't worry about buying a compiler and all that nonsense. Just get gcc and a nice open source editor (eclipse?).

    Oh, and forget the game unless you have a ton of time to:
    A.) Learn the language entirely. This can take several months to several years.
    B.) Ti
    • What evidence do you have that well-written Perl would be harder to maintain than well-written C++? I think you're trotting out the same FUD that really undermines people's choices about Perl.
    • Hey now, don't be dogging perl :-) If you want something you will actually use for day-to-day stuff, pick perl. If you want to get into the gutts of programming, pick C++

      When people whine and moan about readability and perl, I always like to mention that any language can be hard to read (perl can made to be extra hard to read) but any decent programmer can make perl or any other language readable (say hello to your friend the comment for example).

      • Now now, I'm a big perl user. If I right readable perl and readable java and show them both to my wife (non-techie) I guarantee you she could read the java and not the perl. Simple as that.

        Granted, perl is great for shell scripting and admin practices, but if you want to learn to program, go with a programming language.
        • Since its more difficult to justify a language which doesn't necessarily help me out in the job, i might have to go the Perl route initially. If I can fanagle the course using gcc tho...

          As for the games, the more complex one is a topdown 2d wargame. Basically a generic tabletop wargame for the 'puter. It would use hexs and different tiers of equipment to work itself out. The 3D shooter I'd like to make I would try to borrow one of the free FPS engines and simply modify that. The other 3D game would b

  • They don't have Ruby or objective-C . As a C and perl person , I see perl going the way of the dodo ,python and ruby are just as quick and far easier to maintain . c# is just like java but not nearly as portable *. C++ whilst not an ideal language is one of the most widely used and supported so it would be a good choice .

    so in conclusion
    Perl , is obsolete(hate to admit that) unless you have a real reason to need to know perl you can get by with a much easier to learn modern scripting language.

    C# , it's Java
    • Wow, I'm surprised that you would say that Perl is obsolete. I find Perl to be well organized, and to have a better organized base (via CPAN) than the alternatives you've mentioned. Ruby is certainly better structured from a purist standpoint, but it doesn't have the toolset that Perl has, and won't for a long time. Python, on the other hand, I consider to be easier, but far worse from a usability standpoint.

      Of course, speaking of dead, Obj-C was losing market share before it left the gate.

      • Well i did exaggerate with Perl ,but Ruby and python are overtaking it (I'm just pissed off with Perl this week , been maintaining some old code)
        Obj-c is currently undergoing a renaissance with OS X and is gaining a lot of ground , I have been learning it recently and have been fairly impressed with it .

        I have been switching everything I can over to ruby recently due to its incredible ease of use and it is a dream to maintain on par with Pascal .
        CPAN is an important factor for Perl still being alive , but I
        • Perl has a big future, too. Have you seriously taken a look at the work on Perl 6 and ther Parrot project? Take a nice long read, seriously, you might be surprized at where the language is heading.

          Oh, well, I've been to Perl Mongers meetings, and even done lightning talks, so perhaps I'm biased, too.

          • ;) in geek culture it is natural . Just look at Emacs Vs VIM arguments . We are all biased heh .
            I imagine I will drift towards perl again next year I am really finicky about it , a Love/ Hate relationship
            • I love Geek debates. I was an Amiga user (and still have my A1200!) and used to get into arguments wiht Mac and PC users in college. Of course the Amiga did actually die quite literally (at least Commodore did) so that does take some of the piss out of my position;-) Thank you both for your comments.
              • I miss my Amiga and CD32 ;) heh .Workbench was second only to Mac OS as cool easy to use OS's .The Atari ST vs Amiga arguments could get violent .. I myself used both (The ST for music ) so i punched myself
                • So long as someone was punched!

                  What annoyed me was that, at the time (~'93) I had a stock A1200 with a 68020 and 2 megs of RAM. The school Macs were 68040's with 8megs of RAM (I think). My Amiga was faster and more stable, but I still had to use the Macs for certain things. Annoyed the biological waste out of me.

                  • them's fighting words boy ;) heh .
                    I liked my Amiga and it certainly was stable .. mainly because stock Amigas did hardly anything ala a console (could do more , but mainly didn't ) so they definitely were very stable and the OS was exceedingly lightweight , but at a cost . it did what it did well but what it could hardly do was very apparent
  • First and foremost, I recommend picking and going. After you get through any given language, picking up a second one isn't nearly as difficult. I would suggest avoiding a class dedicated to SQL, simply because - once you have a handle on another language, it's something that's relatively easy to pick up on a needs basis.

    For all of them, the hardest part is learning the libraries that are bundled (varies by language and platform). Most overlap for available libraries is Perl followed by standard C, follo

  • Some CS profs don't even understand:

    1. Not every problem lends itself well to object oriented programming.

    2. Even nowadays, C++ is not as portable as other languages, such as C. This could be important for some applications.
  • As far as cost is concerned, Microsoft has free (for one year) "Express Editions [microsoft.com]" of its major tools. From a quick glance at the features, they look like they will probably fit your needs.

    I'd advise learning C++, particularly if you're interested in making a game. I've been using it since 1991 (Turbo C++, then Borland, then Microsoft), and I like the language a lot. It's not easy, but it is very powerful. And, should you need to, you can get right down to the metal. But learn some good object-orien
    • Despite what RG said, I've not found it to be appreciably slower than C++.

      One example I can think of right away: Accessing a Web service via SOAP. The C# hits me with a 3 second response time (!!!) whereas a C++ object generated with sproxy.exe (uses COM) or gSoap is less than 1 second.

      My guess is that C# is a lot like Java (which I do not know), so what FK said in that vein is likely accurate.

      I know both C# and Java. Once you know one, picking up the other is a pretty trivial matter. C# = Java, only

      • We have a message processor for a particular class of EDI messages, coded in C++. Relatively old, stable code, well-tested. A particular client was sending invalid messages, so we ended up coding a preprocessor in C# that would fix up the messages. It does substantially the same work (receive, parse/format conversion, XSL, format conversion), and runs at roughly the same speed as the C++ processor. We did some performance testing, and it held up well under load, either on a separate box or the same as t
    • In my opinion, the time best spent is that spent learning to design and implement programs well, regardless of language. C++ will probably get you there best.

      And that's something that, regardless of language, I want to do. Since this is just getting me started, I don't want to pick up bad habits right off the bat. C++ in some ways appeals to me because, on the surface at least, it looks to be the more challenging of the two. I've always found it easier to start with the hard stuff, then everything else

  • by NFLFan ( 878402 )
    Well I don't know C#, but I do know Java which is very similar, and I too would suggest C++. Since it is an introductory course, I do not think the two would be that much different though.

    You are probably a lot more likely to find people to help you with C++ on here rather than C#.

    I would be surprised if either class was a really good introduction but if it gets you thinking more like a programmer it is a step in the right direction.
    • I would be surprised if either class was a really good introduction but if it gets you thinking more like a programmer it is a step in the right direction.

      That's a huge part of it. I want to get the basics down. Once I have some initial learning and know a bit better what I'm doing, then I feel like I can move forward and learn a lot more.

  • but i can just tell you what i did... maybe it will help. maybe not.

    i was a graphic designer, with zero experience in programming or computers for that matter.

    one day i got curious and started dabling with html... making a website (in '93) for my zine. i then learned about cgi because i wanted to have a guestbook. i hated all of the guestbooks (about three of them at the time). so, i got the code for one that i hated the least and said "what the fuck is this shit?"

    it was written in perl (4). i had no idea,
    • so, have fun... and set to learning.

      The key, as it were;-) Thanks for the thoughts and a telling moral. I see myself in my current position for a looong time, but I would like to add some languages to my knowledge base. Since this will be an intro, I will certianly not be limited whatever my choice.

  • C++ Programming for the Absolute Beginner

    Disadvantage: For starters I'd have to kick down an extra $70 or so for the Borland Compiler suite- unless I can obtain a copy of it from a friend of mine or make different arrangements with the teacher. While it is more cross-platform than C# I think it still requires considerable skill to code for different OS's.

    Not true... just use gcc compiler that comes standard with Linux as a nice "free" alternative. If you are going to utilize Linux for this purpose mig

Biology is the only science in which multiplication means the same thing as division.

Working...