unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Carlo Zancanaro <carlo@zancanaro.id.au>
To: Ryan Sundberg <ryan@arctype.co>
Cc: Steve George <steve@futurile.net>,
	 guix-devel@gnu.org,  r0man <roman@burningswell.com>,
	 Reilly Siegel <mail@reilysiegel.com>,
	 Maxime Devos <maximedevos@telenet.be>
Subject: Re: Proposal to turn off AOT in clojure-build-system
Date: Tue, 20 Feb 2024 08:38:10 +1100	[thread overview]
Message-ID: <87le7gp22l.fsf@zancanaro.id.au> (raw)
In-Reply-To: <bb45cde9-4043-43bf-9339-571ea70e3b9e@arctype.co> (Ryan Sundberg's message of "Mon, 19 Feb 2024 10:13:09 -0800 (PST)")

As someone who has worked as a professional Clojure programmer, I would
like to add my voice in support of this:

On Mon, Feb 19 2024, Ryan Sundberg wrote:
> ... In my experience using AOT is the exception rather than the rule;
> it is a nice optimization when practical for release engineering, but
> typically the juice is not worth the squeeze.

That is: the norm in the Clojure community is *not* using AOT, so there
isn't any specific statement against it. It's just assumed that you
won't use AOT unless you have a reason to do so.

Reading the clojure.org page about compilation[1] with this in mind, we
see four possible (although admittedly not exhaustive) reasons to
provide AOT compilation:
 - to deliver your application without source
 - to speed up application startup
 - to generated named classes
 - to create an application that does not need runtime bytecode
   generation and custom classloaders

I'm not convinced any of these apply across the board in Guix.
Potentially for some libraries and applications it does, and so should
be applied in those specific cases.

The next statement on the page, after those reasons to use AOT is: "The
Clojure compilation model preserves as much as possible the dynamic
nature of Clojure, in spite of the code-reloading limitations of Java."
Or, to read it another way: AOT compiled Clojure is not as dynamic as
on-the-fly compiled Clojure. This isn't a bug in Clojure, this is how it
is designed to function.

It could be argued that it is a bug in the individual libraries to not
work with AOT, but I think it's inappropriate for Guix to attempt to
impose "AOT is the right way to do things" on Clojure libraries. That is
not the norm in that community.

As a personal datapoint: I spent three and a half years working on
mission-critical Clojure libraries and applications, and I have never
used AOT compilation in production.

Carlo

[1]: https://clojure.org/reference/compilation


  reply	other threads:[~2024-02-19 21:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-19 11:46 Proposal to turn off AOT in clojure-build-system Steve George
2024-02-19 14:44 ` Maxime Devos
2024-02-21 11:29   ` Steve George
2024-02-22 14:57     ` Maxime Devos
2024-02-22 15:33       ` Andreas Enge
2024-02-22 15:47         ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
2024-02-22 17:44           ` Maxime Devos
2024-02-23  2:13             ` Maxim Cournoyer
2024-02-22 17:12         ` Maxime Devos
2024-02-23 12:41           ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
2024-02-23 16:49       ` Steve George
2024-02-19 18:13 ` Ryan Sundberg
2024-02-19 21:38   ` Carlo Zancanaro [this message]
2024-02-24  3:39 ` 宋文武
2024-03-09 22:27 ` Ian Eure
2024-03-12 12:12   ` Jean-Pierre De Jesus Diaz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87le7gp22l.fsf@zancanaro.id.au \
    --to=carlo@zancanaro.id.au \
    --cc=guix-devel@gnu.org \
    --cc=mail@reilysiegel.com \
    --cc=maximedevos@telenet.be \
    --cc=roman@burningswell.com \
    --cc=ryan@arctype.co \
    --cc=steve@futurile.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).