Earlier quoted context omitted.
Words can be helpful for people who don't like symbols? C is very terse, Pascal verbose. It's like C vs Python. Single-character symbols can be hard to parse for some people in the same way words are for you. A good IDE / code structure will make the structure and code easy to differentiate anyway.
I see no difference in learning symbols in order to read source code and learning alphabet in order to read words/sentences.
Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal
41–50 of 103 posts
Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal
#42https://castle-engine.io/why_pascal I'm gonna have to put a damper on things, here. Most of the reasons listed are things available in any other modern language (safety, cross-platformness, libraries...) but one of the things cited is readability. I work on Pascal code 8 hours a day, and it is not more readable then conventional C syntax ; I'd argue it's much less. The fact that you need to use entire words to denote…
> The fact that you need to use entire words to denote syntax makes it much harder for your brain to parse things : Instead of immediately seeing "this is code structure" and "this is actual code", you need to actually read the words to make that distinction. It is very counter-productive and a bad design solution, imo. While I agree that it gets slightly tedious to read daily, I have to say that there is no language…
*: excluding `for (… of …)` and `for (… in …)` – I can never remember which is which. `for (… of …)` is the one you can use with Arrays and other iterables.
Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal
#43https://castle-engine.io/why_pascal I'm gonna have to put a damper on things, here. Most of the reasons listed are things available in any other modern language (safety, cross-platformness, libraries...) but one of the things cited is readability. I work on Pascal code 8 hours a day, and it is not more readable then conventional C syntax ; I'd argue it's much less. The fact that you need to use entire words to denote…
I'd disagree with that. I've worked on several Free Pascal projects, C projects, C++ projects and some other stuff and i find it easier to follow Free Pascal code in big projects written by other people than C/C++/Java/etc. At least, i'd say that outside extreme cases (like esoteric languages - or trying to write OOP code in an XML-based language with only imperative functionality :-P), readability is up to the reader.
Go is the only other language i found easy to follow, despite not really knowing much about the language itself, but Go is also a much simpler language, more limited in its feature set - Free Pascal on the other hand is a "kitchen sink" language where everything and anything goes and yet it still remains easy to read.
That said, IMO the #1 reason to use Free Pascal isn't so much the language itself (most of the stuff mentioned are also available in, e.g., D - and i'd say that D does a much better job at doing compile-time stuff to the point where you can probably implement yourself any missing features from Free Pascal) but the Lazarus IDE and the FCL and LCL frameworks. Well, that and that it has a very fast compiler with a decent optimizer (and there is the new LLVM backend if you need more oomph, though with a big hit to compile time) and a large number of supported platforms.
Also great backwards compatibility. That is very important, if my X years old code that used to work stops working without externally imposed reasons (e.g. uses OS-specific code and i switched to another OS or the universe replaced x86 with RISC-V) i don't care how clean, consistent, elegant or whatever else a language might be that give theoretical language designers warm feelings, i care that my code that worked doesn't work anymore.
Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal
#44Earlier quoted context omitted.
Words can be helpful for people who don't like symbols? C is very terse, Pascal verbose. It's like C vs Python. Single-character symbols can be hard to parse for some people in the same way words are for you. A good IDE / code structure will make the structure and code easy to differentiate anyway.
I see no difference in learning symbols in order to read source code and learning alphabet in order to read words/sentences.
Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal
#45Earlier quoted context omitted.
> The fact that you need to use entire words to denote syntax makes it much harder for your brain to parse things : Instead of immediately seeing "this is code structure" and "this is actual code", you need to actually read the words to make that distinction. It is very counter-productive and a bad design solution, imo. While I agree that it gets slightly tedious to read daily, I have to say that there is no language…
In my experience, Python, C and JavaScript* all have this property; whereas I have to relearn Pascal, Haskell, sh and (to an extent) Rust every time I go away from them for a bit. I think this is more a property of you or I than of particular languages. *: excluding `for (… of …)` and `for (… in …)` – I can never remember which is which. `for (… of …)` is the one you can use with Arrays and other iterables.
There's more that will trip you up in JS if you leave it for too long. Off the top of my head:
1. Which function definition (`function` or `=>`) do I need to use in order to make the `this` keyword point at the correct object in an event handler/anonymous function/foreach parameter?
2. I see code with both `!==` and `!=` - what is the significance of using both?
3. Long chains of `filter` and `map`.
Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal
#46https://castle-engine.io/why_pascal I'm gonna have to put a damper on things, here. Most of the reasons listed are things available in any other modern language (safety, cross-platformness, libraries...) but one of the things cited is readability. I work on Pascal code 8 hours a day, and it is not more readable then conventional C syntax ; I'd argue it's much less. The fact that you need to use entire words to denote…
Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal
#47Earlier quoted context omitted.
In my experience, Python, C and JavaScript* all have this property; whereas I have to relearn Pascal, Haskell, sh and (to an extent) Rust every time I go away from them for a bit. I think this is more a property of you or I than of particular languages. *: excluding `for (… of …)` and `for (… in …)` – I can never remember which is which. `for (… of …)` is the one you can use with Arrays and other iterables.
> *: excluding `for (… of …)` and `for (… in …)` There's more that will trip you up in JS if you leave it for too long. Off the top of my head: 1. Which function definition (`function` or `=>`) do I need to use in order to make the `this` keyword point at the correct object in an event handler/anonymous function/foreach parameter? 2. I see code with both `!==` and `!=` - what is the significance of using both? 3. Lon…
With its tuple, object, and destructuring syntaxes JS actually ends up with some of the most readable mapreduce code of mainstream C-derived languages (it’s soooo much worse in Java).
Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal
#48Hah pascal, the first language I learned to script some game named Soldat when I was a kid, fun times
Soldat was actually the first shareware I bought, as I totally didn't have to, yet I sunk so many hours in it. Without doing much progress skill wise :-D
Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal
#49Earlier quoted context omitted.
I see no difference in learning symbols in order to read source code and learning alphabet in order to read words/sentences.
Most probably you already learnt the alphabet in the past, and there is 0 cognitive load for your brain to parse it. Unless you come from a language using another alphabet, but then unfortunately you need to bow to Latin alphabet rule over programming languages in any case.
if ((input = 'y') or (input = 'Y')) then
begin
writeln ('blah blah');
end
else if ((input = 'n') or (input = 'N')) then
begin
writeln ('blah');
end
else
begin
writeln ('Input invalid!');
end;
if input == 'y' || input = 'Y'
{
writeln ('blah blah');
} else if input = 'n' || input = 'N'
{
writeln ('blah');
} else
{
writeln ('Input invalid!');
}
If you find Pascal easier to read, I would guess you have very special set of eyes.Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal
#50How fancy, hopefully the project is successful - interesting language choice, always have put "Pascal" as an out-of-date language, but clearly I was wrong
Turns out Go is mostly Pascal with curly braces and nobody is calling Go out of date ;)
I mean it doesn't even have generics or exceptions, get with the times.