From: Lawrence D'Oliveiro <ldo@nz.invalid>
Subject: Re: "Usability" (was Re: Map iteration and modification)
Date: Tue, 9 Jan 2024 20:30:36 -0000 (UTC) [thread overview]
Message-ID: <unkadb$24p45$7@dont-email.me> (raw)
In-Reply-To: uncuas$qe2g$1@dont-email.me
On Sat, 6 Jan 2024 21:21:30 -0400, J-P. Rosen wrote:
> Yes, I'm always surprised to see many languages (including Rust)
> praising themselves of being "concise". Apart from saving some
> keystrokes, I fail to see the benefit of being concise...
How about this for an example. I created a Python wrapper around the Cairo
graphics library <https://www.cairographics.org/>. There are already other
Python wrappers, which are little more than transliterations of the C API.
I wanted to go one step further. So whereas in C you might write
x1 = - scope_radius * sin(trace_width_angle);
y1 = scope_radius * cos(trace_width_angle);
cairo_line_to(ctx, x1, y1);
my Python wrapper reduces this down to
ctx.line_to(Vector(0, scope_radius).rotate(trace_width_angle))
How’s that for “concise”?
next prev parent reply other threads:[~2024-01-09 20:30 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-28 13:53 Map iteration and modification DrPi
2023-12-28 13:59 ` DrPi
2023-12-28 16:06 ` Dmitry A. Kazakov
2023-12-28 17:57 ` DrPi
2023-12-29 3:20 ` Randy Brukardt
2023-12-29 9:51 ` Dmitry A. Kazakov
2023-12-29 15:03 ` G.B.
2023-12-29 16:52 ` Dmitry A. Kazakov
2024-01-01 19:27 ` G.B.
2024-01-01 20:55 ` Dmitry A. Kazakov
2024-01-02 16:40 ` G.B.
2024-01-02 20:57 ` Dmitry A. Kazakov
2024-01-03 3:22 ` Randy Brukardt
2024-01-03 4:05 ` moi
2023-12-30 7:21 ` Randy Brukardt
2023-12-30 11:07 ` Dmitry A. Kazakov
2024-01-03 3:15 ` Randy Brukardt
2024-01-03 10:04 ` Dmitry A. Kazakov
2024-01-04 4:07 ` Randy Brukardt
2024-01-04 11:28 ` Dmitry A. Kazakov
2024-01-05 2:00 ` Randy Brukardt
2024-01-05 9:26 ` Simon Wright
2024-01-05 11:51 ` Dmitry A. Kazakov
2024-01-06 7:25 ` Randy Brukardt
2024-01-07 15:06 ` Jeffrey R.Carter
2024-01-09 4:46 ` Randy Brukardt
2024-01-09 5:56 ` when-clauses (was Re: Map iteration and modification) Lawrence D'Oliveiro
2024-01-09 9:43 ` Map iteration and modification Jeffrey R.Carter
2024-04-17 10:12 ` Cóilín Nioclás Pól Glostéir
2024-01-06 2:54 ` “Usability” (was Re: Map iteration and modification) Lawrence D'Oliveiro
2024-01-06 7:03 ` "Usability" " Randy Brukardt
2024-01-06 8:14 ` Niklas Holsti
2024-01-06 23:41 ` Lawrence D'Oliveiro
2024-01-07 1:21 ` J-P. Rosen
2024-01-09 15:19 ` Bill Findlay
2024-01-09 20:30 ` Lawrence D'Oliveiro [this message]
2023-12-29 3:08 ` Map iteration and modification Randy Brukardt
2023-12-29 13:53 ` DrPi
2023-12-30 6:29 ` Randy Brukardt
2023-12-31 13:56 ` DrPi
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox