If you consider Go as a low level language, you might want to try C# which can be as low level as Go while having a lot of high level features. NativeAOT compiler allows you to statically link native libraries or create native shared libraries (.dll/.dylib/.so) that can be consumed from other languages. It's kind of 2-in-1 language, but the ecosystem is primarily focused on the high level part, so you can only depend on small portion of it.
If you are OK with less popular languages you can check any of these: Nim, Hylo (formely Val), Vale, D, or Zig.
I haven't tried any of these yet, but they all have piqued my interest. Nim is probably the easiest one.
I've been using it for a while. The string handling is magic compared to that of C/C++ with pointers and nulls and the constant need to allocate and free memory to get things done.
The only downside is the documentation. Listing the parameters of a function and not explaining the purpose of the function, or what those parameters actually mean, is not proper documentation.
Borland set a fairly high bar with the Turbo Pascal 3 manual.
I see Free Pascal mentioned quite often on HN, so I suspect many are. I recently attended a Delphi conference where several people were using Free Pascal, including one session presenter.
I've also been using Oxygene, which is a different Object Pascal dialect. (This started because I have begun working with RemObjects - I have to admit, I have wondered why I never used it earlier.) It had design decisions to evolve it more like newer languages (eg it has inbuilt async/await and did on .Net before C#, tuples, nullables etc) and sanitised the syntax somewhat. I like it a lot. https://www.remobjects.com/elements/oxygene/language
Pascal is not a low level language - quite the opposite. That being said, various implementations provide low level facilities, including turbo pascal back in the days , and free pascal which I did use in the early 2000s.
If I were you, if you like fpc, I’d actually look into Ada ( the OO part is a bit odd granted but works ). You’ll get extremely high control over low level stuff ( it’s used in the embedded world ) along with high expressivity and excellent performance.
If you like go, modern pascal is basically that with less curly braces. The other way around is true, too.
There’s zero technical reasons to not use pascal. Popularity, library availability, programmer availability and LLM quality of responses may be, but the technical foundation is there and has been for at least a decade (if not since turbo pascal from early nineties.)
I quite liked FreePascal and thought that Lazarus makes the experience even more palatable. Stuff like this is really good for cross platform GUIs without having to shove a whole browser in there: https://en.wikipedia.org/wiki/Lazarus_Component_Library Oh and the compiler is pleasantly fast and the language feels a bit easier to work with than C++ and the whole RAD approach in general for GUI software in particular is something that I yearn for more of.
At the same time, even modern Pascal dialects seem niche and the communities and libraries aren't quite there, especially when it comes to the ease of doing something like webdev: mORMot exists but will never be as popular and deeply integrated with everything like something like Spring Boot https://github.com/synopse/mORMot2
That said, there are also some cool projects out there, for example, a whole game engine: https://castle-engine.io/
I'm especially mentioning that, because the dev actually did a nice writeup on Pascal: https://castle-engine.io/modern_pascal
There's also a list of some software using Pascal: https://wiki.freepascal.org/Projects_using_Free_Pascal and sometimes it's packages that you might not immediately think of, like PeaZip which is a nice little program: https://github.com/peazip/PeaZip
I will also say that the idea of having a community Wiki for the programming language and the projects around it seems really nice: https://wiki.freepascal.org/ Maybe not possible for super widespread languages, but for someone taking a look around this is really, really nice.
Not me personally, but I just finished playing a retro FPS set in 1980s Czechoslovakia whose game engine is written in Pascal: https://store.steampowered.com/app/824600/HROT/
Checkout Nim! Despite its Python like syntax it inherits concepts from Pascal.
Yes, I still use FreePascal for utilities, libraries and console apps. I write these in Lazarus on Linux, and run them on local machines or (for some console apps) on our Intel Synology NAS. It's nice knowing I can easily recompile for other operating systems if I need to.
For some tasks FreePascal is quite clunky, but the lower level the task, the quicker it is to write a solution.
One of the languages taught in high school in South Africa is Object Pascal (via Borland Delphi), so this is actually the first programming language I learned.
I think Object Pascal is quite a nice language, it feels like OO without a whole bunch of messy package protected Java nonsense.
Not as my primary language, but I wrote two or three small command-line tools for my own use in recent years. Cross-compilation and platform support is excellent, so it is convenient for writing something once to run on multiple systems as just a static binary without having to mess with installing any dependencies on the target systems.
Sticking to very basic, procedural, non-OO, Pascal though. At its core Free Pascal, like early Turbo Pascal, is very small and simple, even compared to C, and there is value in that, especially since it is also a whole lot safer than C (but still has things like pointers and inline ASM when you need that).
I've been enjoying writing a Gameboy emulator in Odin - it interfaces nicely with C libraries (I've been using SDL and its been much easier to set up than with C++)
Tooling it a bit lacking, but the language is simple enough you can get away with using a semi-broken LSP.
The language feels light and expressive, and has generally gotten out of my way - the only thing I've been really craving is closures.
You might not like it because it has errors as return values like Rust/Go, however there are some directives/macros/keywords such as `or_return` which work a lot like `?` in Rust.
The paper "C is not a low level language as we are not programming a PDP11" (something like that anyway) made a good point that C is only fast on a multi core machine because c fans work hard at keeping the laurel. What does a low level language look like when you have 8 cores? Conversely what would a high level language look like for (low level) verilog and FPGAs?
Ada is more serious than Pascal. There is Ada-to-C(++) translator called AdaMagic. It is limited to Ada 95, but Ada was ahead of time and so 95 is fine. On most platforms GCC is available, and Ada is the most interesting language in GCC, but just in case there is AdaMagic.
Out of curiosity, where were your pain points with Go regarding lack of classes? Go offers types, methods & interfaces, that gets you pretty far while avoiding inheritance. I found it pretty reasonable and not limiting (coming from a background with C/C++/Java then years of python).
Interesting fact: lately I've been benchmarking few things around and I have found out that the same algorithms in JavaScript tend to outperform C in O0.
Why does that relate to your post? Because if you're going lower level for performance you may actually find your assumptions to not hold true unless a good compiler optimization phase is involved.
I hope Swift gets more cross-platform love, including GUI toolkits.
I do!
I love it so much, it has a great balance between: readability, fast write/compile/debug cycle and great performance.
On tip: LLM is God send for it. So many times I find what I was looking for written in some other language and the LLM does the conversion.
Check out Lazarus IDE, it's really good, especially for beginnerd.
[dead]
[flagged]
Write in C, write in C
Write in C, write in C
Pascal won't quite cut it
Write in C
Real men don't eat quiche.
FP is an interesting language. In my opinion, it is somewhat problematic that different language concepts (Delphi, etc.) have been more or less merged into FP, resulting in redundant object models, for example. Pascal as a language also has various historical legacy issues (dangling else, block overhead, global namespace, etc.), which Wirth corrected in Modula and Oberon. The compiler is huge and apparently difficult to maintain (see e.g. https://github.com/rochus-keller/freepascal/). The resulting, optimized x86 code achieves about 70% of GCC compiled C code (see e.g. https://forum.lazarus.freepascal.org/index.php?topic=64261.0), and it turned out that desctructors and some built-in data structures are extremely slow. So I went on to implement my own Pascal/Oberon descendant (see https://github.com/rochus-keller/micron/, work in progress).