CommunityNews

CommunityNews

Hello, declarative world

A computer is an imperative machine. Its CPU reads a list of instructions and performs one operation after another, with each operation modifying the state of its registers and memory. But that doesn’t mean we always have to write our computer programs as imperative step-by-step recipes; imperative programs are often too low-level and overspecified, which is why we’re generally terrible at writing them.

One interesting alternative is declarative programming, where we focus on describing a problem instead of listing exactly what steps to take to solve it. That idea’s been around for a long time but has recently begun to reappear everywhere.

In this article I want to encourage you to think outside of your normal programming habits. I’ll present a more abstract and declarative style called relational programming, and show you how to implement a minimal relational language in Ruby.

This article is based on a talk I gave at Joy of Coding 2015 and the London Ruby User Group. The video of the talk is below, and the slides are also available. All the Ruby code is on GitHub, and James Coglan has ported it to ES6, Haskell and Python.

Read in full here:

https://tomstu.art/hello-declarative-world

This thread was posted by one of our members via one of our news source trackers.

Popular General Dev topics Top

AstonJ
Just been adding some more portals, currently have the following languages: Apache Groovy C C# C++ Clojure CoffeeScript Crystal ...
New
AstonJ
Curious to know which languages and frameworks you’re all thinking about learning next :upside_down_face: Perhaps if there’s enough peop...
New
AstonJ
The reviews are coming in - if you spot any or have a review of your own, please add it :nerd_face: @ohm will be pleased, they seem to b...
New
AstonJ
Inspired by this post from @Carter, which languages, frameworks or other tech or tools do you think is killing it right now? :upside_down...
New
DevotionGeo
The version of Java installed with Android Studio on my Mac is the following (when I run java -version) openjdk version "1.8.0_242-relea...
New
PragmaticBookshelf
Craft your dream role at work by guiding your manager to take your priorities into account when making decisions. Ken Kousen @kenko...
New
DevotionGeo
I installed Github Copilot (VS Code extension) and signed up for the technical preview three days ago. Yesterday I got the invitation, an...
New
First poster: malloryerik
GitHub - hlissner/doom-emacs: An Emacs framework for the stubborn martian hacker. An Emacs framework for the stubborn martian hacker - G...
New
CommunityNews
9 fintech engineering mistakes. Read this list unless you want to build a money dissappearing system
New
CommunityNews
Christian Mills - Testing Intel’s Arc A770 GPU for Deep Learning Pt. 2. This post covers my experience training image classification mod...
New

Other popular topics Top

malloryerik
Any thoughts on Svelte? Svelte is a radical new approach to building user interfaces. Whereas traditional frameworks like React and Vue...
New
DevotionGeo
I know that these benchmarks might not be the exact picture of real-world scenario, but still I expect a Rust web framework performing a ...
New
AstonJ
I’ve been hearing quite a lot of comments relating to the sound of a keyboard, with one of the most desirable of these called ‘thock’, he...
New
New
AstonJ
Biggest jackpot ever apparently! :upside_down_face: I don’t (usually) gamble/play the lottery, but working on a program to predict the...
New
Maartz
Hi folks, I don’t know if I saw this here but, here’s a new programming language, called Roc Reminds me a bit of Elm and thus Haskell. ...
New
AstonJ
We’ve talked about his book briefly here but it is quickly becoming obsolete - so he’s decided to create a series of 7 podcasts, the firs...
New
Help
I am trying to crate a game for the Nintendo switch, I wanted to use Java as I am comfortable with that programming language. Can you use...
New
AstonJ
Chris Seaton, the creator of TruffleRuby has died. It appears from suicide :cry: He left this note on Twitter on the weekend: And one...
New
PragmaticBookshelf
A Ruby-Centric Chat with Noel Rappin @noelrappin Once you start noodling around with Ruby you quickly figure out, as Noel Rappi...
New