Path: csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: John Ames Newsgroups: comp.os.linux.misc Subject: Re: C/C++ timeline (was Re: Python: A Little Trick For Every Need) Date: Fri, 6 Feb 2026 14:43:16 -0800 Organization: A place where nothing fits quite right Lines: 28 Message-ID: <20260206144316.00001326@gmail.com> References: <-EOdnRUZmNTqQx_0nZ2dnZfqn_qdnZ2d@giganews.com> <10lvc6a$2a0lm$4@dont-email.me> <10lvt12$2g653$1@dont-email.me> <10m0915$2ka88$5@dont-email.me> <10m0fnd$2n7r1$3@dont-email.me> <10m25v7$36k4g$3@dont-email.me> <10m2855$38cir$2@dont-email.me> <10m2b84$30icq$1@dont-email.me> <20260205080604.00002be0@gmail.com> <20260205095745.0000319c@gmail.com> <20260206112850.00006164@gmail.com> <10m5knv$h5mp$1@dont-email.me> <20260206135513.00001a9e@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Date: Fri, 06 Feb 2026 22:43:29 +0000 (UTC) Injection-Info: dont-email.me; posting-host="e773039c119d47a2d73f7b6a13718f13"; logging-data="576116"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX187bMNssh5YZ/xCNZ4yusJkAZlsAUu94ZQ=" Cancel-Lock: sha1:lWc0+qEgN2kvZNVHKLtPnvM7V+s= X-Newsreader: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-w64-mingw32) Xref: csiph.com comp.os.linux.misc:81807 On Fri, 06 Feb 2026 22:29:37 +0000 Richard Kettlewell wrote: > I don=E2=80=99t get on well with Java either, but I think the last two > examples are written in an unnecessarily obscure fashion. I think you > would normally write the following: >=20 > Integer a =3D 2, b =3D 3; > Integer c =3D Integer.max(a, b); >=20 > ...which is certainly a trifle verbose, but not actively misleading. I could've been clearer, I s'pose, but it was my point that there are, for a random subset of math functions, multiple ways to write the same thing, using classes with no direct relationship - java.lang.Math isn't a subclass of java.lang.Number and its subclasses, nor the other way around, nor is there some kind of Math interface that they both implement. (In fact, these methods aren't even part of Number - they only belong to its subclasses individually!) Why, then, do they duplicate functionality? Why some methods and not others? Why are the methods for specific Number types static instead of specific to the object, so that one could at least have Math.round(num) for arbitrary number variables, but Double.round() for reflexive rounding of a specific Double object? It's just arbitrary and weird.