notes-computer-programming-programmingLanguageDesign-prosAndCons-subtext

subtext: decision tables instead of conditionals (visualization of DNF). Combines with function expressions to create "schematic tables" which are apparently a complete programming language. see fig. 13 vs fig 14. of http://subtextual.org/OOPSLA07.pdf

A new version of subtext was briefly called http://coherence-lang.org/ but then the guy decided to stick with subtext (http://alarmingdevelopment.org/?p=637).

Haskell damage By Jonathan Edwards

Published: April 26, 2010

Per Vognsen suggests a Haskell version of the damage function from my Schematic Tables talk:

data Attack = Magic

hit surprise defense attack = damage where effectiveness = power * (if surprise then 3 else 2) (power, damage) = case attack of Magic -> (5, max 0 (effectiveness - defense)) Melee -> (4, 2 * effectiveness / defense)
Melee

This passes pairs of values (power, damage) through conditionals. That allows the conditionals to multiplex more than one value, rather than being repeated. I suspect I could stymie that approach with more complex data flows, but I am happy to acknowledge that Haskell does OK on this example. Thanks, Per. Posted in General

Comments closed