Language golden paths

submited by
Style Pass
2023-01-25 03:00:10

Golden paths that programming language designers should incorporate into their core principles

These paths manifest in concrete language choices, or in my case restricted ways I use fuller languages in more simple ways. These are their stories.

Arguably the most important golden path: enforcing the surface area or interface of any piece of software be small. This is also known as encapsulation, but doesn't need to be related to object-oriented programming.

It's not too much more typing but enough to communicate the explicit choice to make some things public and keep others private.

Ruby is encouraging public-by-default by making the private version way more typing. When the more lax thing is easiest to do, it becomes unclear what the author's intent was: did they mean to expose the method to everyone or did they simply forget to close that door?

Leave a Comment