TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: ALL
from: =?UTF-8?Q?BJ=C3=B6RN_LUND
date: 2021-01-08 14:39:00
subject: Re: AI and decompilation?

Den 2021-01-06 kl. 03:17, skrev Eli the Bearded:
> In comp.sys.raspberry-pi, Charlie Gibbs   wrote:
>> On 2021-01-05, Martin Gregorie  wrote:
>>> Its very useful indeed in Java: its often helpful to use the same name
>>> with different parameter lists for constructors and also for methods that
>>> all do similar jobs, e.g for outputting values from a class its helpful
>>> to use the same method name,  with different parameter lists say:
>>>
>>> getValue(String caption, int value);
>>> getValue(String caption, double value);
>>> getValue(String caption, boolean value);
>
> Java gets that from C++ doesn't it?
>
>> I find it easier to just cast "value" to a consistent type.
>> But then, I'm a hidebound C weenie...
>
> Use a union type with an enum for which value in the value is
> the proper one. That can easily expand to new types that are not
> easily cast.
>

easy ?



How someone can object to the ease of overloading is just beyond me.


--
Björn

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.