* * *

Author Topic: Updates to the "Modern Object Pascal Introduction for Programmers"  (Read 2004 times)

michalis

  • Jr. Member
  • **
  • Posts: 87
    • Homepage
Hi,

I wrote a few new chapters to the "Modern Object Pascal Introduction for Programmers" book:


It is also available now under a shorter URL, on a new domain for my Castle Game Engine. The book is not tied to the Castle Game Engine (I want it to be something useful on it's own). Although it is also part of my plan for "how Castle Game Engine can succeed", as it helps programmers interested in Castle Game Engine to use the Object Pascal language :) If you like it, please consider supporting me on https://www.patreon.com/castleengine !

Thaddy

  • Hero Member
  • *****
  • Posts: 4275
Re: Updates to the "Modern Object Pascal Introduction for Programmers"
« Reply #1 on: June 06, 2017, 12:48:49 pm »
Unless you update that shit about interfaces I can not recommend anything that you write. Please do what I tell you, the rest is pretty good... <grumpy mode still on, you look like an idiot when you write about interfaces and you have the brains to understand them... >:D >:D >:D >:D >:D >:( >:( >:(>
Otherwise, let me re-write that part. (which I already offered months ago)

Otherwise your work is pretty good and I highly recommend it for inclusion in the other thread...

Just the final touch: understand interfaces.... And a good chapter about how to work with them... :-X
« Last Edit: June 06, 2017, 01:06:53 pm by Thaddy »
"Logically, no number of positive outcomes at the level of experimental testing can confirm a scientific theory, but a single counterexample is logically decisive."

mse

  • Full Member
  • ***
  • Posts: 227
Re: Updates to the "Modern Object Pascal Introduction for Programmers"
« Reply #2 on: June 06, 2017, 01:18:48 pm »
Otherwise, let me re-write that part. (which I already offered months ago)
Please don't. michalis is right.

Thaddy

  • Hero Member
  • *****
  • Posts: 4275
Re: Updates to the "Modern Object Pascal Introduction for Programmers"
« Reply #3 on: June 06, 2017, 05:22:10 pm »
Well, go away and believe in The Donald. He does not interfaces and memory management.
He has a little clue about the rest of pascal syntax (for which I complimented him) but no clue at all about interfaces and their memory management. Hence that piece still sucks. without *. Experts will confirm this if you all like. I am not the only one... He is plain wrong. I asked him. Asked him to correct it. explained how to correct it, so don't even ask. It is plain and simple: what he wrote about the subject is wrong, inaccurate and not true. Bad science. >:D >:D >:D >:D >:D

And bad science makes bad teachers. Sorry. I am right. >:D >:( >:( :D
« Last Edit: June 06, 2017, 05:31:02 pm by Thaddy »
"Logically, no number of positive outcomes at the level of experimental testing can confirm a scientific theory, but a single counterexample is logically decisive."

Thaddy

  • Hero Member
  • *****
  • Posts: 4275
Re: Updates to the "Modern Object Pascal Introduction for Programmers"
« Reply #4 on: June 06, 2017, 05:42:19 pm »
This is especially important if interfaces are used in any serious application.
Forget about classes, in that case, never mix them, and you have a seriously powerful tool.
What he does is being stupid. He mixes, and then accuses...which is The Donald or worse if not corrected.

If I offend anyone, just replace "The Donald" with "Ignorance". Keeps the moderators happy <grumpy  >:D>

Why make a good book bad? michalis? I hate to say I told you so! >:D The rest is pretty ok... O:-)
« Last Edit: June 06, 2017, 05:46:25 pm by Thaddy »
"Logically, no number of positive outcomes at the level of experimental testing can confirm a scientific theory, but a single counterexample is logically decisive."

michalis

  • Jr. Member
  • **
  • Posts: 87
    • Homepage
Re: Updates to the "Modern Object Pascal Introduction for Programmers"
« Reply #5 on: June 19, 2017, 05:51:57 am »
Thaddy:

1. Again I want to ask you to keep your tone normal. Accusing me and calling me names doesn't help in the discussion.

2. I have explained, hopefully quite clearly, why I prefer the Corba interfaces in the chapters "9.1. Good (CORBA) interfaces" and "9.2. CORBA and COM types of interfaces". The CORBA interfaces are how Java and C# interfaces work, too (there are links to Java and C# specs in the book). So I know I'm not the only person who prefers interfaces to work more like CORBA than COM.

If you don't agree, then please discuss this with people who designed Java interfaces, and C# interfaces, and Pascal CORBA interfaces.

3. As I said in other thread, repeatedly, I have actually applied some of your corrections you have send me long time ago about COM interfaces. The first chapter about COM interfaces only shows the correct usage of COM interfaces.

In the following chapter "9.5. Using COM interfaces with reference-counting disabled" I mention the usage with mixing, but with a very clear warning "don't do it, or you need to watch our for temporary interface variables, so it's probably not the best way to use COM interfaces". So I don't advice this usage myself. But it's not my invention. The standard Pascal library contains the TComponent type that contains the _AddRef / _Release implemented to disable ref-counting, to enable this usage. And people are doing this themselves, just google for "delphi reference counting" to easily find example where people are defining _AddRef / _Release to "avoid" reference counting but still have interfaces.

If you don't agree with this usage, then discuss this with people who designed the Pascal and Delphi to allow it, and who implemented the TComponent methods to allow it. I only show it with a clear warning "it's dangerous, watch out for temp variables, you're better just using CORBA interfaces in that case".
« Last Edit: June 20, 2017, 05:19:32 pm by michalis »

tudi_x

  • Full Member
  • ***
  • Posts: 245
Re: Updates to the "Modern Object Pascal Introduction for Programmers"
« Reply #6 on: June 19, 2017, 08:51:18 am »
hi Michalis,
wanted to thank you for the chapters.
i am a beginner and there is a lot of information i did not see anywhere else.

i think this kind of effort proves the quality level of the Free Pascal solution.

jacmoe

  • Sr. Member
  • ****
  • Posts: 255
    • Jacmoe's Cyber SoapBox
Re: Updates to the "Modern Object Pascal Introduction for Programmers"
« Reply #7 on: June 20, 2017, 11:25:36 pm »
Thank you Michalis for your excellent Modern Pascal book, and hooray for the update! :D



And Thaddy:
Yet again you somehow manage to completely ruin a topic. "Well done".
Why the moderators of this board leaves you alone is a mystery to me.
You are weird.  :)
more signal - less noise

malcome

  • Jr. Member
  • **
  • Posts: 76
Re: Updates to the "Modern Object Pascal Introduction for Programmers"
« Reply #8 on: June 21, 2017, 01:10:15 am »
"MOP". Cool! I want to translate in Japanese!

sam707

  • Hero Member
  • *****
  • Posts: 518
Re: Updates to the "Modern Object Pascal Introduction for Programmers"
« Reply #9 on: June 21, 2017, 01:50:51 am »
@jacmoe

well... I think each forum around da virtual world needs a "doorman"
hmmm
"doorman"?
yep, a guy living in and for the forum (some would say kinda "nolife"), a funny guy always tuning you on the angry path. a guy getting upset when peanuts climb to the sky, a guy maintaining the nerves of the others "alive"

I guess you found out who is the lazarus forum's "doorman" HAHAHA

it doesnt "grump"  >:D
 :P
Lazarus fixes branch (1.8+), Emulators = Radio Shack TRS-80, basic, Pascal 80 , Misosys C pro, Turbo Pascal from version 2 to 5 on amtrad cpc6128 CP/M also a bunch of C compilers. Pascal, C, C++ all versions windows/linux. also assembler from Zilog Z-80 to Pentium MMX

michalis

  • Jr. Member
  • **
  • Posts: 87
    • Homepage
Re: Updates to the "Modern Object Pascal Introduction for Programmers"
« Reply #10 on: June 21, 2017, 01:58:46 am »
Thank you everyone for the good words. There are moments when such comments simply help me to continue working. Thanks!

RAW

  • Sr. Member
  • ****
  • Posts: 423
Re: Updates to the "Modern Object Pascal Introduction for Programmers"
« Reply #11 on: June 21, 2017, 08:59:28 am »
Thanks for the PDF-Version, very nice to take a look at it in between if there is no internet available...
Just started to reading it...  :)


BTW: I don't think Thaddy really means it like that...
I guess it's the way he sometimes thinks or talks/writes.
Don't take it too serious...  :D
Windows 7 Pro (x64 Sp1) And Windows XP Pro (x86 Sp3) - LAZARUS 1.6.4 FPC 3.0.2

Windsurfer

  • Sr. Member
  • ****
  • Posts: 306
    • Windsurfer
Re: Updates to the "Modern Object Pascal Introduction for Programmers"
« Reply #12 on: June 21, 2017, 10:10:40 am »
Thanks for both the Introduction and the updates.

I was particularly struck by para 7.2. I remember learning about call-backs on Windows many years ago, but had never made the connection with all of the 'AKAs'. It just goes to show how easy it is to program in Pascal, without a deep clinical understanding.

rgh

  • New member
  • *
  • Posts: 40
Re: Updates to the "Modern Object Pascal Introduction for Programmers"
« Reply #13 on: June 21, 2017, 08:06:37 pm »
Otherwise, let me re-write that part. (which I already offered months ago)

Much as I enjoy controversy, I don't get what the problem is here.

The license for  Michalis' document allows for the distribution of modified copies. So Thaddy, I'd be interested to read your alternative version of how I should think about interfaces.
« Last Edit: June 21, 2017, 08:42:24 pm by rgh »

DomenicoMammola

  • Newbie
  • Posts: 1
Re: Updates to the "Modern Object Pascal Introduction for Programmers"
« Reply #14 on: June 23, 2017, 02:16:40 pm »
Hi,

I wrote a few new chapters to the "Modern Object Pascal Introduction for Programmers" book:
...

Thank you for your book Michalis, really useful to me. Chapter about interfaces included ;)

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus