3 ms·
One of the ideas that really informs my thinking about comparative programming languages is "semantic compression": https://caseymuratori.com/blog_0015 https://
by pjc50 8y ago
One of the ideas that really informs my thinking about comparative programming languages is "semantic compression": https://caseymuratori.com/blog_0015 https://caseymuratori.com/blog_0015
A programmer has an idea of what they want the program to do, expressed in human language and concepts. Programming involves refining this idea in sufficient detail that it can be expressed as a program, replacing the imprecise human thought with precise symbols that will be mechanically interpreted. A programming language offers a set of primitive symbols from which larger concepts can be built.
One reason people avoid programming in assembler much is that the primitives are "too small": they don't relate well to the concepts the programmer is thinking in and you need a lot of them. I wonder if the problem with APL-style languages is that, unless you're used to operating in a mathematical domain, the primitives are "too compressed": a single symbol standing for a large complex concept.
- snaky 8y agoI found this talk just amazing comparing APL with 'normal languages' from the first principles, Macro - Micro, Transparency - Abstraction, Idioms - Libraries, Data - Control Flow, Structure - Names, Concision - Verbosity, Implicit - Explicit, Syntax - Semantics. https://confengine.com/functional-conf-2017/proposal/4620/design-patterns-vs-anti-pattern-in-apl https://confengine.com/functional-conf-2017/proposal/4620/de...
- deleted 8y ago[deleted]
- cousin_it 8y agoFor me, the nicest way to program is to use imperative code that executes from top to bottom and deals with elements one by one. With other approaches, I don't feel as comfortable growing the program incrementally, because they require large changes to the program when the problem statement changes slightly. James Hague said it well in "Puzzle Languages": https://prog21.dadgum.com/38.html https://prog21.dadgum.com/38.html
- avmich 8y agoA relevant quote from J for C Programmers: Writing code in a scalar language makes you rather like a general who gives orders to his troops by visiting each one and whispering in his ear. That touch-of-Harry kind of generalling can achieve victorious results, and it has the advantage that the orders can be tailored to the man, but its disadvantages are significant: the general spends much mental energy in formulating individual orders and much breath in communicating them individually; more significant, his limited attention is drawn toward individuals and away from the army as a whole. Even the great Rommel was overtaxed at times. The J programmer is, in contrast, a general who stands before his army and snaps out orders to the army as a whole. Every man receives the same order, but the order itself contains enough detail for the individual men to act appropriately. Such a general can command a corps as easily as a platoon, and always has the 'big picture' in mind.
- carapace 8y agoI don't like that essay, he's rediscovered refactoring but thinks he's onto something new. Still, this isn't as ironic as when folks coined "DRY" (Don't Repeat Yourself) when they meant "refactoring", thus repeating the idea itself. Refactoring is about 90% of programming (the other 90% is parsing, or is it naming?) and if you're into it you should check out Forth (if you haven't already) specifically "Thinking Forth" http://thinking-forth.sourceforge.net/ http://thinking-forth.sourceforge.net/