r/Clojure • u/lordmyd • Jan 05 '26
Could the Android and iOS APIs have been developed in Clojure?
I've just started a mobile development project after years of using Clojure professionally and the complexity of the labyrinthine Android and iOS APIs is mind-numbing but at the same time I'm doubtful if Google and Apple could have achieved the same end-result using a dynamically-typed, functional language like Clojure. What do you think?
11
Upvotes
5
u/fadrian314159 Jan 05 '26
It would have been quite possible to develop Android and iOS APIs in a dynamically-typed functional language like Clojure. In fact, back when Apple's first handheld device, the Newton, was being developed, Apple's Cambridge Lab was tasked with developing a language to write it's software in. They designed a dynamically-typed, object-oriented Scheme derivative called Dylan. Several iterations of the preliminary Newton software was developed using Dylan, so I have no doubt that it would be possible to write device APIs using dynamically-typed, functional languages. Ultimately, Apple decided not to use Dylan on the Newton platform and the team that wrote the language migrated the language to a standard infix syntax in the hopes that doing so would make Dylan more palatable to a more mainstream user base. (N.B. It did not.) The prefix-syntaxed Dylan has been lost to the tides of time, except for a few copies of the user manual you can find around the web. The infixed Dylan had a book written for it, too, which you can buy used copies of. But it definitely worked as a PoC to develop APIs for handheld devices.
11
u/[deleted] Jan 05 '26 edited Jan 05 '26
Ask Nubank engineers. They use Flutter embedded in Clojure code and backend driven content (BDC) for their mobile app.
2
u/hrrld Jan 05 '26
(:
Oh, they can make anything labyrinth and mind-numbing.
I think the answer to your question is 'no'; they're different kinds of things. Clojure isn't (really) a systems programming language.
If you want to make mobile apps in Clojure, there are ways.
1
u/dustingetz Jan 06 '26
I vote no but i don't think it's a "dynamically typed functional" problem, Javascript is like 55% of the way from Java to Clojure and it did great.
2
u/vlukereddy Jan 05 '26
This looks like a job for Jank (taking some inspiration from Kotlin Multiplatform)
1
u/Astronaut6735 Jan 05 '26
I'm not very experienced with Clojure, and even less so with Android and iOS. Although Clojure is dynamically-typed, it's is strongly-typed. I'm curious about how this would have been a limitation when developing the Android and iOS APIs.