my ideal scripting lang: additions

This commit is contained in:
Wouter Groeneveld 2023-12-09 14:48:02 +01:00
parent 7e7414e684
commit 57332d292b
3 changed files with 11 additions and 3 deletions

View File

@ -5,6 +5,7 @@ categories:
- programming
- learning
tags:
- programming langauges
- html
- Java
- Elixir

View File

@ -6,6 +6,7 @@ categories:
- programming
tags:
- cs1
- programming langauges
- c++
- java
- python

View File

@ -3,6 +3,8 @@ title: "My Ideal Scripting Language"
date: 2023-12-08T20:51:00+01:00
categories:
- programming
tags:
- programming langauges
---
December marks the beginning of the countdown to Christmas, traditionally via Advent calendars. For us programmer nerds, a special one exists called [Advent of Code](https://adventofcode.com/) where each December day before Christmas we're treated with a challenging programming puzzle. This year a good friend convinced me to join in on the fun and so far I have been really enjoying these silly me-moments.
@ -21,17 +23,21 @@ What makes a great scripting language? I suppose that's a bit of a personal ques
**Introspective**. It should be easy to quickly try out different snippets, to gradually cobble together something working. That means a command-line based REPL at minimum, or more ideally an integrated evaluative environment that's easy to work with such as any browser's developer console or [Elixir's Livebook](https://livebook.dev/).
**Functional**. I like `map()`/`filter()`/`reduce()` chaining and I hate it that I can't do that in Go---at least not without shimming my own. That doesn't mean that the scripting language should be fully functional. On the contrary, I still want to be able to mutate things if I can't get things done in another way given the time constraints.
**Functional**. I like `map()`/`filter()`/`reduce()` chaining and I hate it that I can't do that in Go---at least not without shimming my own. I never liked the way Python approached these either. That doesn't mean that the scripting language should be fully functional. On the contrary, I still want to be able to mutate things if I can't get things done in another way given the time constraints.
**Easy to Read**. A requirement of any programming language, but as during hacking I tend to be a bit less clean, I don't want to stare at syntax and wonder what that was for again (I'm sorry Perl). Again, chaining `.map()` for me is easier to read than Python's `map()` where you'll have to wrap around functions.
**Batteries Included**. As the famous Python saying goes...
**Unit Testing Included**. To extend the previous point, I want to quickly and easily be able to write a few unit tests to for example verify the Advent of Code's example input/expected output, and I don't want to bring in external dependencies just for that.
**Unit Testing Included**. To extend the previous point, I want to quickly and easily be able to write a few unit tests to for example verify the Advent of Code's example input/expected output, and I don't want to bring in external dependencies just for that. Go's built-in test suite is great, and I recently discovered Node also [comes with a test runner](https://nodejs.org/api/test.html).
I'm a bit torn on debugging capabilities. Thanks to unit tests and quick evaluation, and due to the limited size and scope of scripts, I find myself needing these less. Languages that compile to other languages (anything on op of JS) or sit on top of the JVM (such as Groovy) do make this more complex.
And then there are requirements I don't care about such as speed (of execution) and ease of low-level (pointer) access.
---
Given the above requirements, most languages I am familiar with are disqualified, such as C, C++, C#, Java, Go, and Kotlin. The following languages---to a certain degree---meet the requirements: JS, Ruby, Python, PHP? I'd love to learn Elixir or Lua and dive deeper into a Lisp dialect or even the [Pharo](https://pharo.org/) "immersive programming experience" to see whether or not I should start switching to something else besides vanilla JS.
Given the above requirements, most languages I am familiar with are disqualified, such as C, C++, C#, Java, Go, Kotlin, Groovy. Of course, (most of) these languages aren't designed with scripting in mind. The following languages---to a certain degree---meet the requirements: JS, Ruby, Python, PHP? I'd love to learn Elixir or Lua and dive deeper into a Lisp dialect or even the [Pharo](https://pharo.org/) "immersive programming experience" to see whether or not I should start switching to something else besides vanilla JS.
It's interesting to read others' opinions on their ideal scripting language. In GOTO 2021, Richard Feldman and Erik Doernenburg [discussed their ideal general-purpose programming language](https://gotopia.tech/articles/152/the-ideal-programming-language), where Elm and Rust are the main stars.