http://subtextual.org/demo1.swf
http://subtextual.org/subtext2.swf - most interesting. Recommended.
http://coherence-lang.org/Onward09video/Onward09video.mp4
Site: http://subtextual.org/ http://coherence-lang.org/
1–10 of 12 posts
http://subtextual.org/demo1.swf
http://subtextual.org/subtext2.swf - most interesting. Recommended.
http://coherence-lang.org/Onward09video/Onward09video.mp4
Site: http://subtextual.org/ http://coherence-lang.org/
http://subtextual.org/demo1.swf
http://subtextual.org/subtext2.swf - most interesting. Recommended.
http://coherence-lang.org/Onward09video/Onward09video.mp4
Sites:
I think it is a great tool for education, but I doubt you can build manageable and understandable complex systems with that approach.
What the author means when he says "copying" is completely different from the usual meaning of the word. He should have called it "linking" or even better "instantiating" (in the sense of prototype-based OO).
This is especially annoying at the end of Demo1 where he concludes that "copy & paste is decriminalized". This sounds much less revolutionary if you translate "copy" into what he actually means. Then it reads like "instantiating and changing objects is decriminalized", which is elementary common sense in programming.
However, this unity has been achieved by the ML languages decades ago. The schematic tables would look much less revolutionary if they were compared with the "case" statement of Haskell or the "match" statement of OCaml.
Also, the comparisons in code size and readability would look very different if the schematic table was compared with code written in a high-level language instead of Java.
Interesting read; what's the status of his Subtext project ?
- The graph structure for the recursion case of fibonacci is easier to read. At least for this simple computation, I strongly disagree. Granted, I am influenced by Programming 1.0, but I don't see how things become much simpler than fib(i-1) + fib(i-2).
- The damage calculation function is horribly factored. The switch statement is duplicated and should be joined or handled differently. Some quick code movements result in this: switch(attack) { case MAGIC: damage = magic_base_damage; damage = account_surprise_attack(surprise, damage) damage = reduce_damage_linear(damage, defense) break;
case MELEE:
damage = melee_base_damage
damage = account_surprise_attack(surprise, damage)
damage = reduce_damage_fractional(damage, defense)
break;
}
I'll leave out the functions, because they are a simple extract method from the function he gave. Once you notice this, and you are in an object oriented language, you can replace this type code with polymorphism and probably form a template method in order to remove the duplication in the general structure of damage calculation. In fact, at this point, I like the refactored solution more, because now it displays the underlying structure of the damage calculations (get base damage, add surprise bonus, apply damage reduction). [[Note: I wrote this while watching it. I arrived at the polymorphic solution after writing this, and at least in my opinion, my solution is pretty clear, opposed to his example. In my polymorphic solution, there is 3 times 1 call downward which returns 1 value upwards, which would be a nice simple W-shape.]]I am not saying that his way has no advantage, and I don't want to bash it too much. I even kinda like it. I would just like to see examples which are harder to rip apart, because at least for me, the refactored damage calculation is pretty clear.
Later on, he brings that argument "I can see everything in the table at once". I really hate this argument. I really, really hate it. Yes, it is nice that I can look at these 3 or 4 values in this example. Yes, I can nicely see them on the screen. And now, I imagine something where we have like 20 - 30 different things. A good class hierachy just swallows this and it is simple to look at the relevant stack of classes. In a table, I need to look at ALL of them, resulting in a lot of horizontal scrolling.
Soo.. tl;dr? I think this is interesting, and interesting for small examples, but I don't see how this scales and I don't see too large examples above well-written textual code.