by speed_spread · 3y ago · 0 comments
Programming languages have advanced _a lot_ since Pascal was created. It's core principles remain valid (safety by default, readability, flexibility). But the feedback loop between language design and actual usage is much tighter thanks to the Internet and open source.
Some things I still miss from my Delphi days are the language-level enumsets, near-instant compilation and RAD tooling (GUI builder).
After using VCL for a year or two, I started branching to other, much more popular programming environments, and was shocked about how bad they were for GUI development. Why would anyone put themselves through the pain of writing interfaces manually using programming languages not designed for it (like C) when you could design everything in a convenient GUI builder?
It's sad they decided to focus on the "enterprise" market and buried themselves in the long term. Writing GUI stuff in Delphi was (probably is) a pleasure: they compiled quickly, looked native, and ran fast on my shitty hardware.
I understand why some programmers dislike Pascal's syntax, but C and C++ are also old and still popular (including for new projects). Syntax and semantics are closely entwined but C and C++ syntax still influence "modern" languages.
It helps avoid the classic "oh, I forgot to return it" bug. Also makes the code more succinct and saves you from having to type an extra line for explicit return.
I kind of get why you would be wary of it, as it is a special variable but compared to other messed up stuff like for example Rust treating a line without semicolon as implicit return, it is a relatively tame solution for this problem and can be easily figured out.
Did you ever had any actual bugs caused by the use of result?
In some cases an implicitly declared variable feels neat and convenient, but I'm not sure it's worth it.