Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 28

Thread: Advantages of learning Pascal?

  1. #11

    Advantages of learning Pascal?

    There's interesting thing about C++ very weird to pascal programmers, it can do this with vectors:

    c = a+b;

    Where pascal is forced to manually iterate it or write function to it:

    c.x := a.x+b.x;
    c.y := a.y+b.y;

    This is just a simple a+b but when it comes to vectors this kind of math can prove really useful. But for this simplicity much complexity lies behind the surface...

    If only pascal had more support, it could be great.

  2. #12

    Advantages of learning Pascal?

    No, it isn't wierd. C++ does the exact same thing and adds the parts together. It is known as operator overloading. Turbo Delphi and FPC both support this. I wrote a unit for this months ago.

  3. #13

    Advantages of learning Pascal?

    I know both, but i aways prefered pascal, more clean and logical syntax and ultil today i don't have found nothing with i can not do with it...

    Also TurboDelphi + Cnwizards makes a perfect combination.

    PS: if you are a good programer in pascal you can easy write in C.
    From brazil (:

    Pascal pownz!

  4. #14

    Advantages of learning Pascal?

    Quote Originally Posted by User137
    There's interesting thing about C++ very weird to pascal programmers, it can do this with vectors:

    c = a+b;

    Where pascal is forced to manually iterate it or write function to it:

    c.x := a.x+b.x;
    c.y := a.y+b.y;

    This is just a simple a+b but when it comes to vectors this kind of math can prove really useful. But for this simplicity much complexity lies behind the surface...

    If only pascal had more support, it could be great.
    operator +(v1, v2: TVector2d): TVector2d;
    begin
    Result.x := v1.x + v2.x;
    Result.y := v1.y + v2.y;
    end;

    This is EXACTLY the same what C++ does. I wouldn't be surprised if these operators were defined in unit matrix... but you can always do them yourself (the C++ lib you used probably had exactly code like that somewhere).

    This is of course FPC specific extension, and quite looked down upon.

    Overloading operators is sometimes nifty, but can cause a hell lot of trouble.
    Feel the power of Open Source.
    <br />Feel the power of Free Pascal.

  5. #15

    Advantages of learning Pascal?

    The trouble generally starts when your operators get side effects. I.e. C++ overloads the [] operator to implement dynamic arrays. Then writing down a [] might have unforseen memory management effects. In the same way using <<and>> for standard i/o is a bad idea. Overloading operators to implement matrices, complex numbers, etc. is generally trouble free.

  6. #16

    Advantages of learning Pascal?

    I think that gcc win against pascal complier only in one thing: cross platform.
    If you wanna do something more than a win32/linux program, for example if you wanna learn os-dev or wanna compile for arm platform or others homebrew, you really need gcc and c/c++ language.
    For all other things, pascal rocks.

    p.s.

    one pascal programming advantage: delphi
    one c++ programming advantage: Ogre3D <-best engine ever made
    Italian Member: Sorry for my bad english.
    <br />Languages known: Delphi 7, C++.
    <br />Experiences with Asphyre, Irrlicht, OpenGL, NDS homebrew, and so on...

  7. #17

    Advantages of learning Pascal?

    I disagree because GCC has cross platform libraries just like Pascal. The language and compiler don't beat Pascal, but the library (specific to forms at least) certainly does win out. The LCL is bloated and large currently, and doesn't render correctly on windows with any alternate or enhanced shell.

    I've also looked at Ogre3D, and while it is free it isn't the greatest. What is the greatest I can't say as I don't specifically look for C++ engines.

  8. #18

    Advantages of learning Pascal?

    Quote Originally Posted by Robert Kosek
    I disagree because GCC has cross platform libraries just like Pascal. The language and compiler don't beat Pascal, but the library (specific to forms at least) certainly does win out. The LCL is bloated and large currently, and doesn't render correctly on windows with any alternate or enhanced shell.
    IMHO But with Gcc is lot more easy

    Quote Originally Posted by Robert Kosek
    I've also looked at Ogre3D, and while it is free it isn't the greatest. What is the greatest I can't say as I don't specifically look for C++ engines.
    If you "can't say" because you "don't specifically look for C++ engines" why you say "it isn't the greatest"??
    I specifically look for C++ engines, and i think (imho) that Ogre3D is now the more professional and powerful free engine. But this is another discussion...
    Italian Member: Sorry for my bad english.
    <br />Languages known: Delphi 7, C++.
    <br />Experiences with Asphyre, Irrlicht, OpenGL, NDS homebrew, and so on...

  9. #19

    Advantages of learning Pascal?

    Quote Originally Posted by GendoIkari
    IMHO But with Gcc is lot more easy
    Really? How do you write a simple GUI application with native look and feel the easy way gcc?

  10. #20

    Advantages of learning Pascal?

    Thanks for the comments guys, I didn't mean to start a flame war!

    I think pascal is more than capable for my needs. I guess it really boils down to just using what will get the job on... then move on...

    Thanks again for the comments.

Page 2 of 3 FirstFirst 123 LastLast

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
  •