Live data from Hacker News

Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal

castle-engine.io

61–70 of 103 posts

Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal

#61

Cannot remember the last time I used a programming language in the Pascal family. Our programming course we had to use Delphi. This was college back in 2001. I purchased a copy of Delphi 5 (my college has version 4) so likely tried things for a year or two afterwards. I doubt I touched Delphi after 2005. In College we had to create a Stock Control program. It was an IT course so most people struggled as programming w…

> Seems like an interesting project but I just dont have interet using Pascal so would be a deal breaker for me.

What are the languages you would prefer to use now?

Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal

#62

https://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…

Words can be read as single hieroglyphs, basically, it is matter of experience.

Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal

#63
post #56

Earlier quoted context omitted.

> 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. 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…

Can you expand on Pascal vs Go? What is Go missing? I do not know much about either language, but the first thing I thought when people compared Pascal to Go (another comment, not yours) was what about concurrency? Go does have strong concurrency story. AFAIK there is a lack of mobile support, so the use case for Free Pascal is strongest for cross platform desktop apps? Is it something you think is still worth learni…

> Can you expand on Pascal vs Go? What is Go missing?

Proper type creation (create a new type for integers less than or equal to 12, and greater than or equal to 1, for example)

Proper enum/ordinal types (Even C is more strongly typed than Go in this instance, because C enums are not just ints, and you can't supply an invalid value to a function expecting a specific enum).

Both these together demonstrate the much stronger typing in Pascal.

Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal

#64
post #53

Earlier quoted context omitted.

> *: 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…

Just always use !==. != will automatically cast and !== won't, therefore "1" != 1 is false and "1" !== 1 is true.

Unless you’re testing if something is null or undefined, in which case a single “x != null” handles it.

Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal

#65
post #54

Earlier 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…

Agree! I also find Pascal very soothing to write. Yes it's a little more verbose than C but it makes you think ahead and stay organized.

Many people have the same experience writing Rust. And they have plenty of time to relax while the program compiles.

Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal

#66
post #49

Earlier quoted context omitted.

Oh, really? 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 s…

Your example isn't idiomatic. You would not write begin/end for single-line cases. Instead it would be: if ((input = 'y') or (input = 'Y')) then writeln ('blah blah') else if ((input = 'n') or (input = 'N')) then writeln ('blah') else writeln ('Input invalid!'); OR even better case uppercase(input) of 'Y': writeln('blah blah'); 'N': writeln('blah'); else writeln('Input invalid!');

Well if we're doing that, then you wouldn't use the curly brackets in the C style syntax example either. If you just make one ideomatic without making the other ideomatic, the comparison ceases to be fair. Anyway, doing that to both of them would make the comparison pointless, because the point wasn't to compare ideomatic code examples, but to compare the syntax in a general case, so writing them slightly unideomatically to show off the general-case syntax is fine, as long as both are written the same way to control for unrelated variables (like special-case syntactic sugar), which is precisely what the original comparison did: write both code samples in the most general way, and crucially in the same way, so we could directly compare the scanability of syntax. And imo C won by a mile.

Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal

#67
post #49

Earlier quoted context omitted.

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.

Oh, really? 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 s…

TBH? I see them basically the same. My brain probably scans equally faster "b...n" and "e..d" then the direction of the curly brace. And I haven't read or written Pascal since early high-school, ~30 years ago.

Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal

#68
post #49

Earlier quoted context omitted.

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.

Oh, really? 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 s…

Your example is not Pascal problem. It is inability of an author to come up with clean looking version. One can do bad style in any language.

Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal

#69

https://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…

As someone who has been coding in Delphi for a living for the past 5 years I'd argue the syntax being verbose is only a small part of a larger problem, which is that (object) pascal is a very bad language for pattern recognition.

The syntax highlighting in current IDEs like RAD Studio or Lazarus is very poor (though I'm not as familiar with the later).

I mean I think aside from keywords, strings, numbers and comments everything has the same color. Even if the syntax was less verbose, we'd still be reading each word. It is basically the same as having no syntax highlighting at all.

And even assuming the syntax highlighting would get better and/or the syntax would be less verbose, we'd still be reading each word because of the case-insensitive nature of the language.

The compiler might not care about the case, but at least my eyes do. So unless I'm reading the word I could not really say whether MyMaGiCaLnAmE and mYmAgIcAlNaMe is the same name or not.

Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal

#70
post #56

Earlier quoted context omitted.

Can you expand on Pascal vs Go? What is Go missing? I do not know much about either language, but the first thing I thought when people compared Pascal to Go (another comment, not yours) was what about concurrency? Go does have strong concurrency story. AFAIK there is a lack of mobile support, so the use case for Free Pascal is strongest for cross platform desktop apps? Is it something you think is still worth learni…

> AFAIK there is a lack of mobile support, so the use case for Free Pascal is strongest for cross platform desktop apps? Both iOS and Android are supported by FreePascal as well as Delphi.

Thanks. Good to know.
Post reply on HN