Earlier quoted context omitted.
I get a bit of nostalgia when coding in Typescript, Kotlin, Swift. It is a sweet revenge that most modern languages, have decided to go with the Pascal influenced approach (yes some ML as well), even most of the C++ wannabe replacements (with exception of Circle).
Yeah go is basically Pascal with C/Java syntax and first class coroutines. What could have been.
I come here not to bury Delphi, but to praise it (2019)
51–60 of 113 posts
Re: I come here not to bury Delphi, but to praise it (2019)
#52Earlier quoted context omitted.
> I started with Turbo Pascal 3, Moved to 4, 4.5, 5, 6 then Delphi. Somewhere in there moved to "C" and then "C++". I never understand why people use "C" as opposed to C. Does anyone use "Pascal" as opposed to Pascal?
If it was Borland's compiler suite it may or may not have been perfectly standards-compliant, hence the quotation marks. The Borland suite from the early 90s seemed to be pretty relaxed/forgiving about what was valid C/C++. My school utilized Turbo C++ 3.0 for instruction (and later 4.5), which implemented some weird subset that was pre-C++98. Plenty of things that I was doing when targeting the Borland compiler barf…
Re: I come here not to bury Delphi, but to praise it (2019)
#53I started with Turbo Pascal 3, Moved to 4, 4.5, 5, 6 then Delphi. Somewhere in there moved to "C" and then "C++". Couple of observations: - Using C (Borland or Microsoft) required two floppy disks - one for the compiler, one for the linker. With most of the Pascal versions you end up just needing one floppy disk, later it didn't matter as we moved to HDD. - First "terrible" experience (by a friend) - he moved from Pa…
Most of the demo coders that I followed (I wanted to become one, but never did anything significant there), and demo docs were done using Pascal. Eastern europeans (like myself) seemed to prefer it more for some reasons. TSR applications while a bit large than pure .asm were possible!
I just don't understand how people can put up with waiting for compilers, Docker image downloads, and "continuous integration" builds that take upwards of whole minutes. Granted, it takes some effort to get things fast, but it is perfectly possible on modern hardware to have lightning fast compilation, and runtime replacement of modules. For some reason most people just don't care, and it sometimes makes one feel terribly lonely.
Also, inline assembly was really nice!
asm
mov ax, 13h
int 10h
end;Re: I come here not to bury Delphi, but to praise it (2019)
#54Earlier quoted context omitted.
> The no-circular-dependencies rule was a huge pain though. It allowed the compiler to be very fast (along with it basically not optimizing), but no other language has copied this C++20 Modules, .NET Assemblies, D modules, Ada packages, and plenty of other othes. Also, Turbo Pascal did indeed allow for circular dependencies between units, as long as the related uses statements were written in the implementation secti…
Modules and assemblies are different. Lots of languages ban circular dependencies between modules (most!). Delphi units were single source files though, and that's a much more painful proposition because it forcibly links source file size and program architecture. I saw a lot of big unit files in Delphi code bases.
Re: I come here not to bury Delphi, but to praise it (2019)
#55Re: I come here not to bury Delphi, but to praise it (2019)
#56$4400 per seat (of which $1000 is annual fee) for a windows-only product with zero job postings?
Re: I come here not to bury Delphi, but to praise it (2019)
#57I know he's talking about Delphi here, but FreePascal+Lazarus is still one of my secret weapons. It has some sort of supernatural force field which causes people to ignore it and unfairly denigrate it; meanwhile I whip up desktop applications in hours that would normally take days.
Last time I looked at this I couldn't really find an easy standard way to make HTTPS API calls and parse JSON, but only spent an hour or two playing with it. Can you point me at the canonical way to do this? What's the Requests of FreePascal?
The packages[0] directory of FPC contains a lot of stuff that come out of the box with the compiler and they often have an "examples" and/or "tests" directory with code you can check. There is some documentation[1] but sadly FCL is really not that well documented - you just have to check the sources for most things.
Note that this is for Free Pascal itself. Lazarus builds on it (LCL, the "Lazarus Component Library", is built on top of FCL) and adds a bunch of additional components of its own. Though usually for non-GUI stuff you just use the Free Pascal classes, Lazarus has some of its own "wrappers" that integrate with the IDE and the form/object designer. The "weblaz" package (it comes with Lazarus but you need to install it manually from Package -> Install/Uninstall Packages) provides a bunch of components for working with the web (mainly for making web apps), including the "TFPHttpClient" component which can be used to make HTTP requests. As a simple example, if you throw a TMemo (multiline text editor) control in a form, throw a TFPHttpClient component and then doubleclick on the form to edit the code to execute during the form's creation you can type "Memo1.Text:=FPHTTPClient1.Get('https://news.ycombinator.com/');" and it will put the HTML code for this forum in the memo (note that you may also need to add the opensslsockets unit in the uses section at the top of the code). Of course that is a very simple example but if you browse the properties and events of the component in the object inspector as well as the available methods by typing "FPHTTPClient1." and pressing ctrl+space in the code editor you can find most of the other functionality the component provides.
[0] https://gitlab.com/freepascal.org/fpc/source/-/tree/main/pac...
[1] https://www.freepascal.org/docs-html/current/fcl/index.html
Re: I come here not to bury Delphi, but to praise it (2019)
#58Earlier quoted context omitted.
If it was Borland's compiler suite it may or may not have been perfectly standards-compliant, hence the quotation marks. The Borland suite from the early 90s seemed to be pretty relaxed/forgiving about what was valid C/C++. My school utilized Turbo C++ 3.0 for instruction (and later 4.5), which implemented some weird subset that was pre-C++98. Plenty of things that I was doing when targeting the Borland compiler barf…
Borland C++ was released before 1993. No wonder it didn't support C++98 at that time.
Re: I come here not to bury Delphi, but to praise it (2019)
#59I know he's talking about Delphi here, but FreePascal+Lazarus is still one of my secret weapons. It has some sort of supernatural force field which causes people to ignore it and unfairly denigrate it; meanwhile I whip up desktop applications in hours that would normally take days.
The best part is that Lazarus is write once, compile anywhere. It works on all major desktop OSes and even some less mainstream ones.
Re: I come here not to bury Delphi, but to praise it (2019)
#60How is it possible that one man was responsible for the creation of Turbo Pascal, Delphi, C#, and TypeScript? [1] I don't look up to many people, but here's one. [1] https://en.wikipedia.org/wiki/Anders_Hejlsberg