Friday, June 10, 2016

Blockly Visual Programming

A visual programming language is any programming language that lets users create programs by manipulating program elements graphically rather than by specifying them textually. Blockly, a project of Google, is a library for creating visual block programming editors. It runs in a web browser and resembles MIT's Scratch application for teaching children to program.

Visual programming needs to be used with FFAS because functional programming is only practical when implemented with visual programming. A characteristic of text-based functional programming is that modules end up being one line of very opaque code. The following example of quicksort written in the Haskell language illustrates this:

      qsort (x:xs) = (qsort (filter (<x) xs)) ++ [x] ++ (qsort (filter (>=x) xs))

Programmers call these "one-liners" and they have a bad reputation. As you try to do more and more the line just gets longer and longer. The great thing about functional programming is that it's much easier to prove that the program is correct, but reading and writing it in text form is difficult at least, and probably impossible unless you have an IQ above a certain level.


No comments:

Post a Comment