[Cuis-dev] Financial Tools app
Hernán Wilkinson
hernan.wilkinson at 10pines.com
Tue Apr 1 08:41:32 PDT 2025
Hi Mark,
thank you for sharing!
I did not have time to look at the code but I evaluated the example and I
saw something I wanted to tell you because it is a "minor common" mistake
when coming from other programming languages. At the end of the
FinancialHistoryView class>>#example it says:
FinancialHistoryView open: history.
Because self is FInancialHistoryView, you could just do:
self open: history.
It is better to send the message to self instead of to
FinancialHistoryView because you reduce coupling and if somebody subclasses
FinancialHistoryView, the #open message will be sent to the subclass, an
expected behavior.
This minor mistake is common when coming for C++/Java/C# etc. where there
is no "class side", just "static"... and in static methods there is no
self/this.
Of course that maybe you copied that example from the book so we should
say that to Adele hahahaha,... if that is the case, no way I'm going to do
that! hahaha.
Thank you and Cheers!
Hernan
On Tue, Apr 1, 2025 at 11:36 AM Mark Volkmann via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:
> I recently finished reading the book "Smalltalk-80 The Interactive
> Programming Language" by Adele Goldberg. Appendix 1 in the book presents a
> "Financial Tools" app. I took a shot at implementing this in Cuis. You can
> find my version here:
> https://github.com/mvolkmann/Cuis-Smalltalk-FinancialTools.
>
> Perhaps someone will find this interesting. Better yet, perhaps someone
> will look at the code and tell me what should be done differently.
>
> --
> R. Mark Volkmann
> Object Computing, Inc.
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>
--
*Hernán WilkinsonAgile Software Development, Teaching & Coaching*
*Phone: +54-011*-4893-2057
*Twitter: @HernanWilkinson*
*site: http://www.10Pines.com <http://www.10pines.com/>*
Address: Alem 896, Floor 6, Buenos Aires, Argentina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20250401/08dbf071/attachment.htm>
More information about the Cuis-dev
mailing list