HACKER Q&A
📣 asim

If you could invent a new programming paradigm what would it be?


We seem stuck in a very old way of writing software. If you were to reinvent it, what would it look like?


  👤 alexmingoia Accepted Answer ✓
If I were to invent a language it would be radically simple: No functions, one data type, global scope, no modules, and no standard library.

- No package manager, code can be included with URLs, and signed via protocols that support signatures (ex: Git). No “modules” or package metadata, just source code files that are concatenated.

- Global scope, aided by the ability to namespace includes.

- A single data structure, like LISP. Probably records/dicts but could be anything.

- Only two types: Integers and UTF-8 strings. I’m serious.

- No functions. Data transformation occurs though pattern matching / destructuring.

- Automatic compile-time static memory allocation.

- Streaming I/O, with incremental computation, to allow for static memory allocation.

- No standard library, only semantics for destructuring the single data type, integers, and strings.

I think the closest languages to this would be variants of datalog.


👤 snicky
A language designed for easy dictating/listening rather than writing/reading, for people with muscle/movement dysfunctions or vision problems.

Another vague idea that came to my mind recently was a language in which everything is a function (similar to Ruby were everything is an object). No idea what for or what sort of implications it would have.

[edit] another idea


👤 austincheney
Scope tree. So much of what we access is a tree model: DOM, JSON, XML, file system. That data could be interfaced more directly if represented in a programming language as a tree of lexically scoped spaces opposed to the clunkiness of objects in OOP.

👤 withinboredom
I’d love to see an event-oriented language that is high level and not hardware oriented.

👤 whollacsek
Take a look at darklang that might be a potential future

👤 fardo
Programming doesn't really have a strong "Physical space" and "designing representations with meaning" component.

When you imagine a pinboard of information, for example, you can have all sorts of content on it, including

>Pictures,

>Handwriting on top of typed documents

>Pins and twine connecting documents to show relatedness of things

>Physical highlighter being applied to important or interesting document sections

>Physical arrangements in space that are able to indicate similarity, under physical headings

>Reference materials hung up for quick reference in the same space as the actual things you'd reference them for

>The ability to unpin stuff and instantly hand it to someone else for them to look at in their hand, at their desk, with zero hesitation or lag

>The ability to personalize and express oneself through stylistic choices and design that communicate information about the documents you have up (monospace bold documents tend to look like bills, times new roman documents like student essays, comic sans like you're making a non-serious presentation)

Now, considering al the above, it seems to me a problem that despite the physical expressiveness and interactivity possible on the above described physical pinboard, our in-text-editor flat programming IDEs and programming languages feel wholly unequipped to make it easy as a first-order task to interact, think, and expressively manipulate code bases in this fashion.

I suspect this ability holds us back as an industry, because if making clear the mental models which interrelate parts of our code and go into a codebase were explicitly elevated to the level of business-logic and implementation in terms of importance, the ease of onboarding and of system expansion by other persons who need to understand your project I believe could dramatically be accelerated by weeks or months of developer time, which in the real world can and does make-or-break projects.

Attempted solutions like having devs, in parallel with their normal work (and generally, with little reward or incentive from management) writing documentation in programs like OneNote or making slide decks or unrelated-to-actual-implementation design docs, the current state of windowed computers displaying disconnected programs all in a clumped pile most closely comparable to a stack of physical papers covering one another, and tree-based file systems as a first order representation of code base relationships between files and systems I suspect are all absolutely paltry by comparison to the expressiveness capable on the physical pinboard.

Solutions to the above I think would require a very different editor, possibly a very different viewing and interaction terminal (VR being one possibility), and probably a very different programming language than the ones I feel we currently have that would make all of this feel as natural as the current flat and isolated file-based IDE editing people are used to.