Results 1 to 10 of 40

Thread: The future of Pascal as language for games

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Ok, now you're exgerrating a bit.

    Quote Originally Posted by deathshadow View Post
    (...) lacking all the tools to prevent errors in the first place that pascal does. No forward declaration, typo's instantly become new variables
    Uhm, forward declaration is exactly the thing .header files do in C. And if you mean forward declaration of variables, well, there's nothing that would hold you back from putting all the vardecls at function beginning, then slapping a newline or two and putting actual code. I don't know a lot of languages, but typos becoming new variables is mostly a PHP thing, where "first appearance equals declaration" is a means to make coding faster. No such thing appears in C/CPP.

    Quote Originally Posted by deathshadow View Post
    =, == and === as separate operations
    Well, yep, this is somewhat annoying, but mainly due to the fact that = also returns a value (otherwise a=b=c would not be possible), so putting "if (a=b)" instead of (a==b)" works perfectly fine and most often, if the compiler isn't set to verbose, it won't even give you a hint that there is an assignment instead of comparison in the conditional. As for ===, I gotta say, that's my most beloved PHP syntax element.

    Quote Originally Posted by deathshadow View Post
    seemlingly random and inconsistent use of -> vs. . on STRUCT
    derp. Sorry, but no. It's exactly the same as use of "^." vs. "." on Pascal records/objects. The -> operator in C-like languages stems from the fact that dereference is done by putting * before the varname - and, as far as my memory goes, the dot has higher priority than the asterisk, so you must do "(*a).b" in order for it to work. This thing is obviously hard to read, so to easen things up, the -> operator was introduced. So - if it's a static var, you go ".", if it's a pointer, you go "->", as you would go "^." in Pascal. Nothing random nor incostistent for me.

    Every language has its pros and cons, that's needless to say. Pascal sometimes tends to get a bit to verbose, while minimalism is one of key traits of C. This most often makes writing in C-derivatives quicker and I'd even say, easier. As much as Pascal purposely introduces some error control, C purposely does not so - following the thought "if you don't want to, no one will force you". So, following the foot joke, it's kind of "compiler forces you to make sure you aren't aiming at your foot before shooting" vs. "you can shoot wherever you like and checking whether you're not aiming at your own foot is up to you".

    As for me, one of the things that still keeps Pascal back is a lack of a good IDE. Recently I had to, as part of my studies, write an app in QtCreator - and honestly, I found it quite entertaining, as the thing had all the syntax completion I could ever long for, drastically reducing the amount of key-smashing needed. As for Lazarus, well, dunno, maybe it's just me, but I absolutely hate hate hate the "shitload of floating windows" type of interface - I would much prefer if there was an option to have a "single window with embedabble/movable/switchable panels" one.

  2. #2
    Quote Originally Posted by Super Vegeta View Post
    As much as Pascal purposely introduces some error control, C purposely does not so - following the thought "if you don't want to, no one will force you". So, following the foot joke, it's kind of "compiler forces you to make sure you aren't aiming at your foot before shooting" vs. "you can shoot wherever you like and checking whether you're not aiming at your own foot is up to you".
    I can't say for FPC/Lazarus but in latest versions of Delphi you can turn off a lot of theese error checkings. I personally rather see that compiler warns me of potentionally bad code rather than I have to go bughunting becouse of one single poorly writen line. I started programing in C++ and I must say that I had huge problems in making simple code work properly.

    Quote Originally Posted by Super Vegeta View Post
    As for me, one of the things that still keeps Pascal back is a lack of a good IDE. Recently I had to, as part of my studies, write an app in QtCreator - and honestly, I found it quite entertaining, as the thing had all the syntax completion I could ever long for, drastically reducing the amount of key-smashing needed. As for Lazarus, well, dunno, maybe it's just me, but I absolutely hate hate hate the "shitload of floating windows" type of interface - I would much prefer if there was an option to have a "single window with embedabble/movable/switchable panels" one.
    Pascal does have a good IDE and it is Delphi. It alows a lot of syntax autocompletion. The only thing about it is that it forces it's own style of code formating wich is a bit different that the one I'm using.
    As for the floating windows from Lazarus. They are implemented like that to mimic Delphi 7 interface. It can become quite useful when programing on computers with multiple monitors. Having floating windows easily alows you to have code window on one screen and Form design window on the other.

    And if we are talking about pros and cons I think that the biggest pro for pascal is the ability for quickly rebuild existing project (only units wich has ben changed gets recompiled all others are already compiled from before). Becouse of this you don't have to wait several minutes for some big project to be recompiled just to see how change of a single line affects your application.
    I rember the days when I began programing in C++ and had to wait up to a minute to compile some of a bit more advanced Helo World program.
    Yes I know that some of today IDE-s for programing in C++ already allow precompiled units but most of them are still slower at linking them together than Delphi for instance.
    And finally I probably shouldn't even mention that in some cases Pascal based programs runs better than those made in C++ even when they have same function implemented.
    Last edited by SilverWarior; 17-06-2012 at 03:40 PM. Reason: Fixing typos

Bookmarks

Posting Permissions

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