what i wanna see

Some people like to ruminate on their 'ideal programming language'. I get it! It's fun. I'd love to do that. Static types with perfect inference with instant compiling and amazing optimisations... But the shadowy cabal (SEELE) that control my website say that I have to write about actual languages and how I use/would like to use them. Damn those meddlers!

I think there's around 3 general types of language that I would have a use case for. These I can present - by god - in the Business Eight Lambda Effective/Effectful Matrix for Workgroups. Please... enjoy... (the room darkens and the whirr of a slide projector is heard)

BELE/EMfW "Interpreted" "Compiled"
Static types "Workhorse", fairly major projects that don't rely on very high speed/very low requirements Systems programming, very fast e.g. competitive programming
Dynamic types One and done things, quick scripts, quick REPL computation, etc. Can't see usecase - with my definition of "Compiled"

Now, there's quite a few questions one could ask about this table. Let me just pre-empt the most important one now and answer the others when we get to them. So, why are there quotes around "Interpreted" and "Compiled"? That's because I use "interpreted" and "compiled" in the colloquial sense as a distinction of languages, a colloquial sense that actually bundles it up with many other - arguably more important - properties of a programming language that are arguably orthogonal to each-other but seem in practice to "go together". These properties are - in order of importance - "has a REPL", "has a garbage collector", "has a fairly fast write-run cycle". I put having a REPL first because I think it is by far the biggest qualitative change to how programming in a language works. A REPL enables exploratory programming, just poking around and having a go and seeing what happens. This is great in so many ways. Having a garbage collector "free"s you from tedious and error-prone manual memory management, and similarly tedious but non-error-prone Rust semantics. The final entry in my list, a fast write-run cycle, is what is often the actual effect of an interpreter on a language (apart from how it affects design considerations). But a fast AOT compiler or a good JIT can have the same effect - enabling iterative programming. So for example, Haskell would be 'interpreted', but Go would be 'compiled'.

Oh, one more thing - I will be classifying languages without any capabilities for procedural programming in a seperate section at the end. One less charitable would say that it is not in the Business Matrix because Haskal no jobs, but really it's just because though I like languages like Haskell and Idris [and presumably Forth] for hobbies, I am more comfortable when there is a mutable 'escape hatch' [or... uhh... you know... variables] in my daily programming.

criterion collection

paradigm

I like a healthy mix of procedural features and functional features in my languages. A language without any functional features is out-of-date, in my opinion, since functional languages have been driving almost all of the research in programming languages today (and not without reason - they are beautiful). A language without any procedural features is Haskell, which I have dabbled in enough to understand monads but not enough to be truly comfortable in. (Plus mutable data structures are so often the correct way.)

I'm fairly agnostic to object-oriented features. The good bits about them are easy to emulate with any fairly capable type system.

performance

Performance is fairly important to me. My model for performance is essentially "not Python." Python is dog shit slow. Performance is self-evidently important in systems programming, but it's also important for just your daily programming. Why? First of all, multi-tasking real. On my laptop I have many programs open at one time - and two of these will be running browser processes, one the browser and one fucking Discord. Both of these programs are disrespectful to my CPU and especially my RAM - although in the case of the browser it's really the many terrible webapps I use that are disrespectful. So I will be running this program, most likely, in an environment that can go down to as little as 500 megs of free memory (although when it gets that bad, I close some tabs), and possibly some software-decoding-video amount of CPU used. Secondly, waste of resources. I never waste food put in front of me - why should my computer do the same? 8 gigabytes of RAM was once 'the dream' for me, but now that I have got it my browser tabs have expanded to fill 7 gigs memory and 3 gigs swap. Eight logical cores would also have been a fantasy to me, and yet shit so often runs like shit. Why? Stop it. Finally, server cost. I'm using a shitty ass free AWS server right now. If I have to pay for a better server I will kill myself.

network effect

In other words, libraries. Libraries are great. Me, doing less work... could it really be possible? Good, high quality libraries are a function of the user base of the language. Hence Python and Javascript have a lot of libraries, while Julia and SML do not.

concurrency

When you need this, you really need this. Python sucks at CPU-level concurrency, but async/await is a good facility for IO-level concurrency.


Dynamic interpreted languages

In the Business Matrix I said that I would use these for "quick scripts". Currently I customarily use Python for these projects. Looking at the Python scripts I have on my computer, I have a lot of prototypes for programs that I eventually rewrote in C++ for informatics, some quick jokes I made for my friends, and some one-off scripts to do some data processing/print some specific unicode sequence/apply a map projection to an image/etc. In addition, when I've wanted to play around with a string/some data and find some metrics/transform it in some way, I usually reach for the Python REPL. This is precisely the use case that these languages are meant for.

Verdict: stay with Python for glue code, look into Julia for pure data munging.


Static interpreted languages

I am currently 'between languages' for this category, the "workhorse" category. Literally! The higher level stuff I write in Python, the lower level in Rust. e.g. I wrote a platform for playing UNO Nomic (possible post?) with my friends in Python, but an interface to the game of Whist in Rust. Keep in mind that these languages can very well be compiled so long as there is a REPL and the compiler is reasonably fast.

Verdict: Look into OCaml and SML (probably OCaml).


Static compiled languages

I use Rust here for my own projects and C++ for informatics. There's really only 3 languages that matter here, imo.

Verdict: Continue as usual: Rust for personal, C++ for informatics, C for very interoperable libraries.


The weird stuff

I love Haskell. I love Forth. I love Intercal(?). But I also like mutation, I like variables, and I like, errr, life. Maybe I'm addicted. But you forget one thing, evangelists... I don't want to quit.

Verdict: Have fun!


to end...

Whew, I'm exhausted. I'm going to look into OCaml and Julia. See you, shadow government (some guy with a gun)!


back