Domain: freepascal.org
Stories and comments across the archive that link to freepascal.org.
Comments · 218
-
Re:Learned it 15 years ago
You seem to have been too busy to read before replying.
Let's try again:--
the *implementation* of the string copy library function in C, using some conveniences including assignment returning the value. How would you write this "copy each character" in Pascal
--Are you familiar with the difference between IMPLEMENTING a function and CALLING it? You answered with how you would CALL the function.
Are you familiar with the difference between a character and a string? Just too much in a hurry to read "character by character"? If this isn't clear to you, you can see an actual implementation of Pascal string copy embedded here:
-
Re:What about C syntax?
-
Re:Delphi Object Pascal outperformed MSVC++
Standard Pascal strings were limited to 255 ASCII-7 characters.
But this hasn't been the case for decades. Try FreePascal or the community edition of Delphi to see the current state of Object Pascal.
-
Re:What's wrong with pascal
Actually it is not really dead, as we still have Delphi/Embecado and http://freepascal.org/ (portable across many platforms)
I guess the reason of its decline is that e.g. Borland, which was big in Pascal, emphasized more on C++ and IDEs and bought a CASE company. Microsoft itself never was big in Pascal but focused on MFC. Apple switched from Pascal to C++ and then swiftly to Objective C.
For me "object oriented" Pascal always felt more like a hack than a sound object system. C++ is simply much more powerful, with operator overloading, multiple inheritance and templates.
In the late 1980s and early 1990s folks tried to promote Ada and Eiffel as new languages (they look a bit similar to Pascal on the first glance, Ada more than Eiffel) but both failed because they thought "programming languages" are "a product", and both started with incredible expensive compilers/IDEs.
And around 1995 Java came, and a few years later C# and
.Net. -
Re:Yes and no
C string handling, that's really elegant.
It really isn't. Pascal's string handling is superior. Try it out with Free Pascal.
-
Re:Obcious
"Why Pascal is Not My Favorite Programming Language" was written in 1981 and the criticisms are out of date. Pascal has moved on since then. Try FreePascal (with Lazarus) or try Delphi.
So... just like most people's criticisms of C++ then?
C++ has moved since the 1990s, too.
-
Pascal? Now wait a minute ...
You're welcome to relegate Pascal to the equivalent bin as COBOL, when there is another language that offers what Free Pascal and its corresponding Lazarus IDE offer: cross-platform RAD resulting in lightning fast native executables on more platforms than any other development solution that I know of - all of it at no cost.
-
Re:Obcious
especially Pascal
"Why Pascal is Not My Favorite Programming Language" was written in 1981 and the criticisms are out of date. Pascal has moved on since then. Try FreePascal (with Lazarus) or try Delphi.
-
Re:Turbo Pascal
Well,
joking aside there is a quite complete and portable Pascal: https://www.freepascal.org/ -
Re: In before Fractal of Bad Design
So you are saying that the years since BWK wrote that article have given us even more reasons to dislike Pascal, such as the fact that the only versions that are useful are either dead for 20+ years (Turbo Pascal) or need vendor-proprietary extensions (Delphi)?
No. You have fallen prey to the common hype.
There is, the GCC of Pascal world, that is Free Pascal https://www.freepascal.org/ : an Open Source version with a modern syntax and concepts. The complaints on the article seem someone complaining about Linux arguing that you have to compile the Kernel to add mouse support.
Also, Lazarus https://www.lazarus-ide.org/ is a modern Open Source IDE that picked where Delphi stop and you can develop and compile applications for Windows, Linux and OSX.
-
Re:Projects not quite as popular as GIMP or LO
What should the developer of an application that isn't quite as popular as GIMP, WireShark, FFmpeg, or LibreOffice do to lower the cost of multi-platform building and testing?
Use Pascal.
-
Re:But why?
They don't link against libc?
That is correct. Free Pascal, for example, doesn't link against libc unless you use libc directly or use some library which depends on libc. Free Pascal is not dependent on libc.
-
Re:Memories...
And Turbo Vision lives on in Unix as tvision (GPL) or an older BSD fork for C and C++, or Free Vision for FreePascal. Not sure if any of these projects has been actively developed for some years. But they are fairly mature projects.
Several IDEs have been built using these tools that look like Turbo C++ used to. Kind of neat, and still looks good and is useful on modern Unix systems today.
-
Re:Yay!
You do not need to. Free Pascal is well and alive on multiple platforms and is open source. http://www.freepascal.org/
-
Re:RTFA
If not Delphi, what about Free Pascal?
-
Re:Pascal-based?
-
Re:Yes
-
Re:As a C programmer
You missed the point - if your library is in C, it can be used from just about every language.
You can achieve the same thing with Pascal. This is nothing special about C in particular.
-
Re:As a C programmer
Even on the same OS, stuff written in Java can only be reused by Java
No. If you, for example, compile Object Pascal for the JVM you can go ahead and use Java libraries. As another Free Pascal example, you can also turn on the Objective-Pascal mode to interface with Objective-C libraries.
-
Re:As a C programmer
Even on the same OS, stuff written in Java can only be reused by Java
No. If you, for example, compile Object Pascal for the JVM you can go ahead and use Java libraries. As another Free Pascal example, you can also turn on the Objective-Pascal mode to interface with Objective-C libraries.
-
Re:As a C programmer
Even on the same OS, stuff written in Java can only be reused by Java
No. If you, for example, compile Object Pascal for the JVM you can go ahead and use Java libraries. As another Free Pascal example, you can also turn on the Objective-Pascal mode to interface with Objective-C libraries.
-
Re:fp
Monospace font implies you're talking about fp. I heard Pascal is a dangerous language, but never thought it was that dangerous!
-
Re:C? C++? C#? Checked C?
I agree. Free Pascal is a good open source compiler for Object Pascal. Pascal is a better C than C and Object Pascal is a better C++ than C++.
-
Pascal already open source
FPC - GPL, a very complete environment (Lazarus offers a nicer IDE)
P5 Pascal - public domain (fork of one of the original Pascal systems)
GNU Pascal
IP Pascal
etcAll of which are more powerful than VisualBasic and not really any more difficult to use. (my opinion)
-
Re:Top programming language?
Care to show anything comparable to this blunder in C++
The lack of bounds checking in C and C++ is one of the biggest problems in computer security. 75% of vulnerabilities in 2003 were buffer overflows. It's no use saying "programmers should program better" because that's clearly never going to happen. Buffer overflows keep happening even after C\C++ have been around and in wide use for decades. The best solution is to switch to a language which offers better buffer overflow protections, like Pascal (see range checks in Free Pascal and Delphi. Pascal also has overflow checks (both Free Pascal and Delphi).
-
Re:Top programming language?
Care to show anything comparable to this blunder in C++
The lack of bounds checking in C and C++ is one of the biggest problems in computer security. 75% of vulnerabilities in 2003 were buffer overflows. It's no use saying "programmers should program better" because that's clearly never going to happen. Buffer overflows keep happening even after C\C++ have been around and in wide use for decades. The best solution is to switch to a language which offers better buffer overflow protections, like Pascal (see range checks in Free Pascal and Delphi. Pascal also has overflow checks (both Free Pascal and Delphi).
-
Re:Ubiquity and Longevity
I prefer the "write once, compile everywhere" design philosophy of Object Pascal, which both Free Pascal and Delphi achieve. Free Pascal 3.0 also achieves Java's "write once, run everywhere" with its ability to compile to JVM bytecode.
-
Re:Ubiquity and Longevity
I prefer the "write once, compile everywhere" design philosophy of Object Pascal, which both Free Pascal and Delphi achieve. Free Pascal 3.0 also achieves Java's "write once, run everywhere" with its ability to compile to JVM bytecode.
-
Re:Users per unit of developer effort
Native apps from "garage" developers: zero users on Wii U. Web apps from "garage" developers: greater than zero users on Wii U.
You're not genuinely trying to argue that the Wii U is a significant application platform, are you? It's a games platform for children, and the least successful console of the current generation by a mile. You'd be crazy to target it for applications, native or otherwise.
Even HTML5 game support is weak on the Wii. No support for sound? Does it even have WebGL support? Nope, guess not. And look at this weird non-standard stuff. Effortless support it ain't.
You haven't provided evidence for your claim that web development with all its current limitations, with all the vagaries of differences between browsers is more efficient or productive than native cross platform application development. Some me some real, measurable outcomes instead of making vague assertions.
First, there's the overhead of obtaining hardware on which to test the build for each platform. You essentially have to buy a Mac, buy a copy of Parallels, and buy a retail copy of Windows.
Welcome to professional development. And as you said yourself it's the same deal for web development. What, you got your Wii U for free in a box of cereal or something?
That's fine once your company is big enough to afford "the right development environment".
Many cross platform languages, libraries, and development environments are free. You can use GCC or Rust or Python or Free Pascal and their associated libraries, or use none of them and use something else. You want to do GUI applications? Look, here's an option. Here's another. Use what you want, I don't care.
There are more options available now than ever. Small companies can easily find the right development environment for them for native application development for as much or as little money as they want to spend.
-
Re:Pascal in the real world?
but with the costs of Delphi and that its been around so long and still going means someone is using it.. but who ???
From Embarcadero: - http://www.embarcadero.com/pro... From Lazarus/FPC wiki: - http://wiki.lazarus.freepascal... - http://wiki.lazarus.freepascal... - http://wiki.lazarus.freepascal...
-
Re:Pascal in the real world?
but with the costs of Delphi and that its been around so long and still going means someone is using it.. but who ???
From Embarcadero: - http://www.embarcadero.com/pro... From Lazarus/FPC wiki: - http://wiki.lazarus.freepascal... - http://wiki.lazarus.freepascal... - http://wiki.lazarus.freepascal...
-
Re:Pascal in the real world?
but with the costs of Delphi and that its been around so long and still going means someone is using it.. but who ???
From Embarcadero: - http://www.embarcadero.com/pro... From Lazarus/FPC wiki: - http://wiki.lazarus.freepascal... - http://wiki.lazarus.freepascal... - http://wiki.lazarus.freepascal...
-
Re:Free Pascal is awesome.
FPC comes with a (mostly) TP-compatible graph unit for Windows (32 and 64 bit). It doesn't use BGI drivers, because it doesn't need to. Your mouse code won't work though, since you can't access the mouse driver under Windows using DOS interrupts. We do have our own cross-platform mouse unit you may want to use instead.
-
Re:What happened to Pascal, anyway?
But it don't support pointer arithmetic
Seriously, you need to RTFM before stating such a thing: http://www.freepascal.org/docs...
-
Re:What happened to Pascal, anyway?
But it don't support pointer arithmetic.
Both Free Pascal and Delphi can do pointer arithmetic.
-
Re:C vs Pascal == Perl vs Python
-
Re:C vs Pascal == Perl vs Python
Just use the Exit statement. See Free Pascal's wiki page on Exit and also Embarcadero's docwiki for Delphi. You can also use the built-in result variable to set a function's result value.
-
Re:Pascal?
Is Pascal used anywhere still?
We still get a lot of downloads, so I assume yes
:) -
No
Use Object Pascal. It's a better language to work with than C++. Free Pascal with Lazarus is a good, open source option. Alternatively there's Delphi which also has good cross platform support (Windows, OS X, iOS, Android, but not Linux yet and maybe Windows 10 Mobile soon).
-
Object Pascal
Object Pascal is quite a nice language. The open source Free Pascal compiler targets many platforms and Lazarus gives you an IDE and frameworks for building GUI applications with Free Pascal. Delphi only runs on Windows, but can cross compile to OS X, iOS and Android for making multiplatform applications. See the changes since Delphi 7 for the current state of Delphi and the Delphi roadmap. The Delphi and Pascal subreddits are also pretty good resources.
-
Re:Modula-3 FTW!
Ok, has anyone ever written an OS kernel in Pascal? How about bare-metal code which tweaks registers?
They sure have. You, too, can write your own OS in Pascal. Nikolay Nikolov did.
-
Seed7
The last Pascal-like language I have seen which was more or less interesting is Seed7.
Cursory look at the Free Pascal shows that it has gained lots of useful functions. Bu is that *the* Pascal? The Pascal was standardized by ISO in 1990 and as far as I know there were no new version of the standard since then. The Object Pascal is not standardized at all. And differs between the implementations (Free Pascal vs. Delphi).
-
Re:The thing about new languages...
The biggest one I remember (that several pointed out) was that the length of an array was part of its type, and a function that took an array argument had to specify the array length
OK, that's no longer true. Dynamic arrays have been a feature in Pascal for a long time. You can find out their length with Length(array), their lowest index with Low(array) and their highest index with High(array). Free Pascal has a wiki page on dynamic arrays and so does Embarcadero. Delphi XE7 introduced some new ways of working with dynamic arrays.
-
Re:Delphi...
Always loved Delphi. Went to a dev conference way back in the day when Anders Hejlsberg was still the chief architect at Borland for Turbo Pascal and then the Delphi product.
Have a look at the Lazarus Project if you don't want to get the current Delphi product from Embarcadero.
-
Re:Pascal
You could try freepascal, excellant Turbo Pascal 7 compatibility and even a large amount of Delphi compatibility. It's free and versions exist for Windows, OSX and Linux.
-
Re:Pascal
It teaches good habits (but with the demise of Turbo Pascal I am unable to suggest a worthy compiler).
May I suggest the Free Pascal Compiler with Lazarus as IDE. There's even a Lazarus add-on to automatically configure it for pupils/beginners.
Disclaimer: I am and have been one of the FPC developers for the past 17.5 years (also starting originally with Turbo Pascal, and then moving on to FPC once it became clear Borland wouldn't come out with a 32 bit DOS version).
-
Re:Pascal
It teaches good habits (but with the demise of Turbo Pascal I am unable to suggest a worthy compiler).
May I suggest the Free Pascal Compiler with Lazarus as IDE. There's even a Lazarus add-on to automatically configure it for pupils/beginners.
Disclaimer: I am and have been one of the FPC developers for the past 17.5 years (also starting originally with Turbo Pascal, and then moving on to FPC once it became clear Borland wouldn't come out with a 32 bit DOS version).
-
Re:Pascal
It teaches good habits (but with the demise of Turbo Pascal I am unable to suggest a worthy compiler).
May I suggest the Free Pascal Compiler with Lazarus as IDE. There's even a Lazarus add-on to automatically configure it for pupils/beginners.
Disclaimer: I am and have been one of the FPC developers for the past 17.5 years (also starting originally with Turbo Pascal, and then moving on to FPC once it became clear Borland wouldn't come out with a 32 bit DOS version).
-
Re:Thinking back to my undergraduate days (late 70
Pascal was/is a much better language than Fortran or Cobol.
I would be shocked if it completely died out.Me too. Especially since I've been contributing for 17 years to the Free Pascal Compiler, and it supports more platforms than ever. I also don't see any particular declines in our download statistics or the bug reporting rate. Whether Borland-Inprise-CodeGear-Embarcadero Delphi will survive, that's another question. If they'd disappear, that would however be unfortunate for us too though, since many of our users use both products (Delphi for its polish and commercial support, ours for the multi-platform support).
-
Re:The programming language for the next 20 years.
Check out the FreePascal project. It's still kicking. Not many reasons not to use it.