Live data from Hacker News

Why I use Object Pascal

dubst3pp4.github.io

121–130 of 235 posts

Re: Why I use Object Pascal

#121

I wrote the first version of Outlook Profiler in Delphi 6, then in Delphi 7. Wonderful introductory language for making products (although Perl was my first exposure). The VCL GUI library and IDE work so well together that things today are second rate. Strange that we've not improved this basic need. Today, I write most things in C++ (or C# if I can).

I always felt it’s really strange that making a quick and dirty GUI application is still easier with Visual Basic 4.0 (circa 1995) than with most any modern tool.

Re: Why I use Object Pascal

#122
post #76

Earlier quoted context omitted.

> 2.5 MB, no stdlib/.net/qt needed. This is a pro of Pascal then :) I was also looking for the pros of Pascal in contrast to what we've come to expect of languages while skimming the article.

Lazarus on ubuntu and windows is usable, i'm still struggling with macOS and there is legends and lore of ios/android support. It even seems to support qt, but I have not went there yet. Something else to mention about lazarus is you can hot compile the ide too add in components, fix issues; While using lazarus. It takes a couple of minutes to recompile and there a fail safe cli method to restore. But rather amazing…

That's some interesting pros! Thanks man.

Re: Why I use Object Pascal

#123
post #82

I believe the toolchain offers the best cross-platform GUI option right now. In the best case this can serve as a wake-up call to other languages: get your GUI house in order!

Everyone is (sadly) switching to Electron for this purpose.

Re: Why I use Object Pascal

#124

Hopefully, it has changed but, when I was learning Pascal many years ago, an entire program had to be contained within a single file. No separate compilation files and no linker. For all but toy programs, this made for some very long files which, given the state of editors then, made maintenance a real problem.

UCSD Pascal had separate compilation units (late 1970s). A lot of people from my generation got started with Turbo Pascal and it had units based on UCSD Pascal starting in TP 4.

OMFG this brings back memories, like the promise of a processor that executed p-code. Good times.

Re: Why I use Object Pascal

#125
post #121

I wrote the first version of Outlook Profiler in Delphi 6, then in Delphi 7. Wonderful introductory language for making products (although Perl was my first exposure). The VCL GUI library and IDE work so well together that things today are second rate. Strange that we've not improved this basic need. Today, I write most things in C++ (or C# if I can).

I always felt it’s really strange that making a quick and dirty GUI application is still easier with Visual Basic 4.0 (circa 1995) than with most any modern tool.

I'd like to see what you think of https://anvil.works

It's deliberately built in the Delphi/Visual Basic tradition, and trying to carry those virtues onto the modern web.

Re: Why I use Object Pascal

#126
Most of the points are all well and good (albeit underwhelming) but

>This is maybe the fact, that most developers are annoyed about: the absence of braces and the very verbose syntax of the language. As an example, instead of opening and closing braces, Pascal uses the begin and end keywords for blocks. The if keyword is complemented by the word then. As you can see, the whole syntax is readable like plain English. If you start to cry now, you should consider one important question by yourself: What is more important? The ability to have a short syntax to write code fast or the possibility to read and understand code that was written by other developers or even by you a year ago? I’m in favour of the second fact and I really enjoy that verboseness.

You don't make code more readable by adding more noise.

BEGIN and END is just plain noise

BEGIN And how exactly does this make code "readable like plain English?" END

Re: Why I use Object Pascal

#127
post #116

My dad still runs his business on a software I wrote in 1998 in Delphi. I haven't touched it since then but it is the only code I have that still works 19 years later.

Does it runs on modern Windows or is it running on a VM?

Re: Why I use Object Pascal

#128
My first language in high school was actually Pascal (as in - Delphi) but now I love C, C++, Lua and Python and barely can write Pascal at all, especially since it's so separate from the C inspired syntaxes and semantics. For job reasons I'll also probably learn something 'proper', mainstream, industrial, etc., but not relearn Pascal. But for trolling, having fun or some private GUI work (especially that, thanks to Lazarus) it's just great.

When I got to university they (the university, not the high school, no idea about them) dropped it from the curriculum so my Pascal skill makes me quite unique in that sense.

I only used it once or so during university to troll one doctor leading a class, an old homework grading system still had Pascal available in it in addition to C and C++ so I submitted a Pascal program. In a twist of irony the next class after that assignment was led by another person, a really smart professor who usually teaches in Warsaw who also happened to be quite a good sport about jokes and such, who quickly sarcastically remarked to my Pascal program: we've got a connaisseur in here.

And this whole joke was actually in response to story the person usually leading that class told, about how once during a competitive coding competition (allowing C, C++ and Pascal) where everyone was using C or C++ he was first to submit a correct program and it was in Pascal to which the live judges commented that Pascal is making a grand return, since even back then it was on its way out.

Recently I picked it up again when I needed to do something quite graphical for statistics class on a short notice that would be dealing with graphs and I didn't want to fight Qt, GTK+, HTML5 or whatever into submission and having recently discovered Lazarus I knew it can do it. I quickly whipped up the program, the graphing components were great with API and all but were poorly documented (or not at all). Sadly there were no funny comments from the doctor on that one.

Part of using Pascal for anything at all or even knowing it is actually the funny comments and reactions of others. Some people seem to think Pascal is properly dead, as in - no longer usable, no longer worked on, no longer coded in, at all. Like COBOL or something but with no 'old bank software' and such to save it. When looking for a job I actually even forgot to put Pascal on my CV as being one of my 'very weak' skills but I imagine it didn't hurt my chances... I even share the first name with Blaise Pascal (the French mathematician the language was named for) so that makes my use of Pascal even more appropriate and allows for even more jokes.

After that I also did few UVA[0] tasks but sadly Pascal seems to be broken for many tasks so I gave up (I get an error saying 'mv failed: program.pas and program.pas are the same file').

Later, to not waste and forget what I relearned for the graph program homework and since GUI in Lazarus is so easy to do, I also (shameless plug) wrote a notes program[1] for myself and it was a breeze thanks to Lazarus and the LCL components. Now I use that program daily for my various notes, todos, etc.

[0] http://uva.onlinejudge.org/

[1] https://news.ycombinator.com/item?id=15436840

Re: Why I use Object Pascal

#129
post #126

Most of the points are all well and good (albeit underwhelming) but >This is maybe the fact, that most developers are annoyed about: the absence of braces and the very verbose syntax of the language. As an example, instead of opening and closing braces, Pascal uses the begin and end keywords for blocks. The if keyword is complemented by the word then. As you can see, the whole syntax is readable like plain English. I…

English is great but for all the "noise". Why is "the" a three letter word and not something more concise like "le" or "a"? Why is it "and" and not a single-letter "y" like any sensible language?

You get used to the syntax, and after a while it becomes invisible.

Re: Why I use Object Pascal

#130

Some fun I had with free pascal in college was that you can $DEFINE almost anything to almost anything else: {$DEFINE (:=ab} {$DEFINE ):=ba} ...etc... Code becomes pretty ridiculous: WriteLn ab ab a + b ba * c ba If you define WriteLn, +, and * as other things too you can get horrific looking code. All keywords like program, if, then, and end can be redefined. I wrote a script that would take a regular source file an…

TCL is arguably more extreme in this matter.
Post reply on HN