5 ms·
I remember Pascal as a so tidy and clean language... And verbose. Very verbose... And calling win API was a horror
by p0w3n3d 2mo ago
I remember Pascal as a so tidy and clean language... And verbose. Very verbose... And calling win API was a horror
- andrewshadura 2mo agoOn the contrary, calling Windows APIs was easier than in C, no import libraries required, just declare what you need and there you go.
- asalahli 2mo agoCan't you do the same in C? You don't really need any headers, you can just declare function prototypes yourself
- andrewshadura 2mo agoOf course you can, but it's more cumbersome in C as you also need to link to the DLL, hence the import library. In Delphi, it's all controlled from the function definition. But of course most of the Windows APIs were already provided in the Windows unit. Oftentimes with Pascalish wrappers.
- pjmlp 2mo agoThe irony is that now in 2026 we have COBOL's revenge with Markdown driven programming. Doesn't get more verbose than that.
- cestith 2mo agoFor your viewing pleasure (or horror): https://yamlscript.org/ https://yamlscript.org/
- pjmlp 2mo agoOuch!
- asalahli 2mo agoPlease tell me this is a joke, a la brainfuck
- cestith 2mo agoIt is not. It’s created by Ingy, the same person who created YAML in the first place. It can be used for general purpose programming, but it fits best when you need a little more control over a system than configuring it with flat YAML. Think of it as (too)smart templates for you configuration files or flat-file data stores.
- MattPalmer1086 2mo agoNot sure if you mean Pascal or Delphi here. The Visual Component Library (VCL) was hands down the easiest way to build windows GUIs, no knowledge of the Win API required. But if you did need to do it, it really wasn't hard to do.
- pjmlp 2mo agoEven its precursors, on MS-DOS (Turbo Vision), and first Windows attempt (Object Windows Library with TPW), were great productivity tools. Also I am the opinion Microsoft has never done nothing in C++, despite the Visual prefix, that could actually match either OWL, VCL or Firemonkey on C++ Builder, which shares most of Delphi tooling.
- ValdikSS 2mo agoYou can create chess with Delphi in a matter of literally 30 seconds. Just install "Chess VCL" component, drop it onto the form, compile, and you're ready to go!
- anthk 2mo agoAlso on Free Pascal/Lazarus: https://peazip.github.io/ https://peazip.github.io/ I didn't know PeaZip was written in FP.
- OCTAGRAM 2mo agoPascal was comparably clean, but Delphi library is quite messy. SysUtils is about local time, exceptions, floating number formatting and OS error handling. SyncObjs are about synchronization which is very good. But TThread resides in Classes, together with streams, serialization, base components, lists and other containers. Rapidly created form controllers are implementation of god object anti-pattern. > And calling win API was a horror This is not easy matter in any language. And I called Android API from Delphi. Still quite an adventure
- augustk 2mo agoAfter Pascal Niklaus Wirth designed Modula-2 and then Oberon which is even tidier. Oberon is both smaller and more capable than both of its predecessors. https://miasap.se/obnc/oberon-report.html https://miasap.se/obnc/oberon-report.html
- pjmlp 2mo agoIn regards to Modula-2 and Oberon, there are also the linages that he wasn't involved and are equally cool. Modula-2+, Modula-3, Oberon-2, Active Oberon, Zonnon
- StillBored 2mo agoRecently dabbled in zig because I, like many people, want a "better C" that solves many of the footguns that C has (ex: null terminated strings, lack of integer overflow trapping, slightly higher level data structures) without all the complexity footguns of C++. But concluded its a miss too, I don't want all the dogma around packages, and symbol soup seemingly selected to be different than C. I largely want a "compiler" not a language ecosystem. Zig is seemingly forever going to suffer from chasing purpose built libraries. Aka, why bother with a zig formatter, or crypto when the first thing anyone is going to want to do is swap in openSSL/etc because its dynamically/runtime tuned for its target platform and contains that odd crypto code it turns out you need for pkcs11/whatever. And the realization really is that Andrew Kelley's rant about go/rust/c, is answered by Pascal, which really is a "better C". Sure its verbose, but that I think is really a strong point in the end. Everyone has autocomplete editors and actually typing "begin end" instead of "{ }" is something your editor can be inserting automatically. Also, calling windows API's was incredibly simple with delphi although almost unneeded, but the stdcall/cdecl decoration told the compiler to use C calling conventions instead of pascal.
- ksec 2mo agoYou might want to try Odin.
- StillBored 2mo agoOdin fails on a number of fronts. For example, integer overflow is simply defined behavior rather than some form of trapping/notification systems. This is no better than C really, its just defining what C tends to do anyway, and its a known foot gun. Pascal has footguns to, but they don't tend to be of the form "I added two strings/integers together and the result was not handled reasonably"
- nobleach 2mo agoYeah, it literally hearkens back to an era where "programs" were literally well-thought-out programs like you'd receive at a play - the cast list, the acts, the music, etc. COBOL on punchcards springs to mind here. Lots of organization. I don't hate it... but kinda like Java, it can be annoying to have to dot all the i's and cross all the t's to do such simple things.