4 ms·
I use Pascal for all my projects because it has memory safe strings and arrays. Almost all buffer overflows and security bugs could be solved by rewriting all
by benibela 7y ago
I use Pascal for all my projects because it has memory safe strings and arrays.
Almost all buffer overflows and security bugs could be solved by rewriting all software in Pascal.
Everytime a software crashes, you should say, it crashed, because it was not written in Pascal
I just spend two hours modifying my xml parser to load files that have a doctype with inline declarations. Never needed to load an xml file with a doctype before, and I only wrote the parser for the files I have. I also have plans for a json parser. There is a surprising lack of Pascal libraries.
- dana321 7y agoYou would probably like go, its much like pascal. And it has libraries for everything!
- pjmlp 7y agoExcept, check the language reference for FreePascal and Go, regarding language features. And Go still doesn't have anything comparable to Lazarus, which isn't as feature rich as Delphi/RemObjects.
- flavio81 7y agoLast time I checked, Pascal has generics and exception handling.
- Akira1364 7y agoTwo things: A) The person you're replying to is simply quite wrong about the amount of Pascal libraries available. There is no "domain of interest" I can think of that does not have at least one "defacto" library for it. More commonly though there's four, five, six or more libraries for any given thing to choose from, which often turn out to each have specific strengths such that you may very well end up using more than one of them in your project. B) They would almost certainly probably not like Go. Object Pascal as implemented by Free Pascal is a language that effectively embraces with open arms almost all of the things that Go actively avoids: for example, traditional (single) inheritance, operator overloading, both function overloading and generics, and so on and so forth. As far as inheritance specifically, the general indifferent attitudes towards it of "there are definitely times and places where it makes more sense than anything else to use" amongst Pascal programmers are in my opinion basically a direct result of the fact that "bad experiences the compiler developers personally had with inheritance as specifically implemented by C++" are NOT something that actively factors into their decision making process or something that they really think about or care about at all (or more broadly, something that users of the compiler generally think about or care about at all). This sets it quite far apart from other languages such as Rust, where "things C and C++ arguably did wrong" are in fact heavily influential and both thought about and discussed regularly.
- Akira1364 7y agoThis is a very strange comment IMO. There are already perhaps too many XML and JSON handling libraries for Object Pascal, as well as libraries for pretty much anything else I can think of.
- benibela 7y agoBut do they work and are maintained? I do not trust them. At first I used the fpc xml parser, but it stores everything as utf-16 internally, and once it crashed on me during the utf-8 <-> utf-16 conversion. I do not want to use utf-16 for anything, so that was a completely pointless crash.
- AnimalMuppet 7y agoThis reads like trolling. "It crashed, because it was not written in Pascal"? Come on. It may have crashed because it was written in C/C++, perhaps. But on the exact same grounds, why not say "It crashed because it was not written in Haskell"? (Or any of several other languages.) Why Pascal in particular?
- timbit42 7y agoBecause back in the 1970's, Pascal and C were the two languages battling it out. At the time C seemed like the best option of the two, but now that everything is online, we realize Pascal is the better option of the two.
- AnimalMuppet 7y agobenibela doesn't sound like s/he is talking about the 1970s. Rather, the point seems to be crashes today. But no, the people back then weren't fools wandering in darkness. C won not just because it appeared better, but because it was better. Pascal appeared better - it had better theory, and a better story. But for actually writing software, C was better. Even with all the "shoot yourself in the foot" potential, C was still better. Programming in Pascal was like picking your nose with boxing gloves on compared to programming in C. (I exaggerate, but Pascal was noticeably - and frustratingly - clumsier to use.)