C or Perl - Page 2
Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: C or Perl

  1. #11
    Just Another Geek
    Join Date
    Jul 2002
    Location
    Rotterdam, Netherlands
    Posts
    3,403
    I can agree with that.. Thing is, I'm not a programmer, never was and never will be I just don't like to do things over and over again.. That's what the computer is supposed to do... So I just whip something together to get the job done, simpler, faster and safer.. I do try to "use strict;" as much as possible.. Just not for 1-10 lines of code..
    Oliver's Law:
    Experience is something you don't get until just after you need it.

  2. #12
    Banned
    Join Date
    Jul 2005
    Posts
    511
    Yeah, but that's just it. When I need to do a very simple task, I will still use my Delphi compiler to write some code and do it fast, yet also with strict code. Delphi (Pascal) is a very strict language but also allows you to write fast, simple procedures. Also done my share of big projects in Delphi too, though.

    The difference is that I don't have to maintain a computer most of the time. I want to become a professional (freelance) programmer and thus for me it's very important to write proper code. You can only do this if your compiler doesn't approve improper code.

  3. #13
    Banned
    Join Date
    Jun 2003
    Posts
    1,302
    Actually, because Perl doesn't need to declare variables or manage the memory and simply because it's syntax is so forgiving, I would actually advise AGAINST using Perl to learn programming. Sure, it will be easier to learn to program by using Perl, but you will also learn some sloppy programming techniques that will start to haunt you once you're trying to develop in some other language.
    That is completely wrong.... Perl is only as forgiving as you want it to be, turn warnings and several other settings on, and perl bitches at you more than a C++ compiler after trying to compile your first program.

    You only learn bad coding practices if you want to, and honestly speaking if you learn from any "good" perl book, they usually enforce good coding standards, and styles.... So that statement has about much validity as the statement that C is to kernel as java is to cross-platform coding. (If you don't understand it, ask and I will explain it.)

    Also, most system programming, is maintaining stuff, keeping up with log files, and a crap-load of other stupid things... System programming does not usually refer to kernel lvl coding... That's usually why it is caled kernel lvl coding.

  4. #14
    Banned
    Join Date
    Jul 2005
    Posts
    511
    Originally posted here by whizkid2300
    That is completely wrong.... Perl is only as forgiving as you want it to be, turn warnings and several other settings on, and perl bitches at you more than a C++ compiler after trying to compile your first program.

    You only learn bad coding practices if you want to, and honestly speaking if you learn from any "good" perl book, they usually enforce good coding standards, and styles.... So that statement has about much validity as the statement that C is to kernel as java is to cross-platform coding. (If you don't understand it, ask and I will explain it.)

    Also, most system programming, is maintaining stuff, keeping up with log files, and a crap-load of other stupid things... System programming does not usually refer to kernel lvl coding... That's usually why it is caled kernel lvl coding.
    Sure, you could set up Perl to do more checks. And in C++ you can tell the compiler to ignore almost all warnings and probably some errors too. But the thing it, beginning programmers start with the basic settings of the language they use. By Default, C++ compilers are set to be pretty strict while Perl interpreters are set up to be forgiving.

    Another problem in software development is that the average programmers seems to be a bit lazy. I've seen many code examples and sources of components and even applications (some even commercial!) that would generate quite a few minor warnings that the programmers were just ignoring. I've seen code where the programmer was even too lazy to make it more readable or even to use a proper formatting (indentations, etc) of their source. Some programmers don't even use logical names for variables, simply because they're too lazy to type in names that are longer than three characters. But okay, examples in books tend to be nicely formatted but that's because the editor demands those books to be readable.

    And I think there is a bit of confusion about the word "system programming". But especially on Windows systems this is similar to what you call "kernel programming". But if you like to look at the System Programming Wiki then you will notice that it seems to be very related to using low-level languages and the API provided by the operating system to actually interact with the operating system itself, directly.

    Maintaining log files and doing other stuff, as you call it, is still mostly just application programming. System programming interacts with the operating system, which is exactly why it's called that way.

  5. #15
    Junior Member
    Join Date
    Jul 2005
    Posts
    10
    C is a compiled language. Perl is an interpreted language. difference is is exactly what it sounds like. C/C++ must be compiled in order for the PC to understand it. Perl must have an interpreter (a reader basically) installed in order for the PC to understand it. however there are much simpler languages like VB, which is both a compiled and interpreted language. only problem is is that VB lacks in cross-platform compatibility, where as there are tools for the slightly better language Delphi that will allow programs coded in it to run on Linux.

    so yes it all depends on what you are planning to do. both Perl and C are cross-platform languages, so compatibility isn't really a worry with both. both are what are considered high-level languages.

    my specialty languages are web based. I have a VERY good understanding of HTML, PHP with SQL association (db connectivity and administration), and very basic Perl. PHP has to be my strongest language currently (I no longer consider HTML a language, actually wasted time learning TOO much of it IMO). but in the recent years I have learned a great deal of Visual Basic and Visual C++, currently strengthening my understanding of sockets in C++. to be honest, I think I will stick with C++ as my primary language. just can't beat its OOP functionality, compatibility, and efficiency IMO. of course, that is MY OPINION, and others might think otherwise.


    Peace.

  6. #16
    Ninja Code Monkey
    Join Date
    Nov 2001
    Location
    Washington State
    Posts
    1,027
    How about looking at it from this point of view....what do you want to code for? If you know what type of stuff you want to build that can make it much easier to decide what language to pick up first.
    "When I get a little money I buy books; and if any is left I buy food and clothes." - Erasmus
    "There is no programming language, no matter how structured, that will prevent programmers from writing bad programs." - L. Flon
    "Mischief my ass, you are an unethical moron." - chsh
    Blog of X

  7. #17
    Banned
    Join Date
    Jul 2005
    Posts
    511
    As far as I know, VB is not an interepreted language. You might confuse VB here with either VBA or VBScript. VBA is often used as a scripting language in many applications, with the MS Office products as the most common VBA client. But VB itself is a true compiled language.
    What is worse, for many years people have even pretended that VB would compile to some pseudocode and that the runtime would compile it further. This isn't true either. The VB compiler generates valid Intel/32-bits binaries.
    Then again, VB.NET does compile to some kind of pseudocode, but so do all other .NET languages since that's what .NET basically is... A virtual machine for pseudo-binaries.

    Oh, am not defending VB here, btw. I prefer Delphi myself since Delphi is more like C++ in power, yet more like VB in the ease to learn the language. But I just think that if you're discussing about languages then you should be very aware about which facts are true and which are not!

    Don't forget, if you decide to learn some programming language, it's often a career choice and you might get stuck to that language for most of your career. So what career options do you have?

  8. #18
    Banned
    Join Date
    Aug 2005
    Posts
    6
    Anyone who frequenst this site obviously doesn't have perls

  9. #19
    Custom User
    Join Date
    Oct 2001
    Posts
    503
    lol, loved that last post :P

    If you are looking for a very strict language, then I would definitely avoid C or C++; C compilers are notoriously forgiving. My basis for my last statement is the fact that C and C++ compilers will give error messages when you use incorrect syntax, but will not do a lot for much else (which, ironically enough, is one of the reasons that the two languages are so powerful and interesting to use).

    If you want to learn a strict language, go for Java. (Unfortunately I'm too tired to actually be able to think of reasons to back this statement up :P) But then again, as long as you learn a language using a good tutorial/book/whatever, and are not lazy with your coding style, it shouldn't really matter which language you use.

    People might recommend against learning an object oriented language (such as Java or C++) as your first, but I'm not sure that's great advise. A lot of people have the impression that object oriented languages are more difficult or complex than procedural languages, but I don't believe this is the case. The problem is that most people (including myself) have learnt procedural languages before object oriented ones, and this leads to the impression that OO is tough. I suspect that if an OO language was your first, you wouldn't be phased at all because you wouldn't know the difference.

    I apologise if that was a bit scrambled, but as I explained I'm tired. Perhaps I'll come back later and edit it.

    ac

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 Security News

     Patches

       Security Trends

         How-To

           Buying Guides