A sign of good abstractions can be that they allow you to quickly breed useful new abstractions. This is accented by the feeling that your programming environment is working for you, and not against you. The situation where you are only limited by your thoughts and imagination, not what the computer is willing to allow you to do. It’s a feeling that I rarely capture outside of using Emacs. It’s a common joke that Emacs is a great operating system — it just lacks a decent text editor. Usually this is used in a backhanded way, but I’ve always viewed it as a strength. Emacs never tells me “No”, which is both a great danger and an incredible asset. In that spirit of development, I love to push Emacs to new limits to see what it is capable of… which as you will read now includes ClojureScript.
The biggest limitation to this approach is that since Deno and nodejs have different APIs for file access, certain operations like file access will need some special code, i.e. you will need to use
js/Deno readTextFile instead of using ClojureScript’s standard library and relying on the translation the ClojureScript compiler provides.
Performing a basic Fibonacci benchmark gives us the following (ClojureScript on top)
Output is in milliseconds for fib(40). This benchmark isn’t very in depth, and I’m sure that I could micromanage it further, but it is very promising.