DISQUS

DISQUS Hello! Phil Dawes' Stuff is using DISQUS, a powerful comment system, to manage its comments. Learn more.

Community Page

Jump to original thread »
Author

The Factor Attraction

Started by phildawes · 9 months ago

It’s been a couple of months and I’m still slower writing code in Factor than in Python or Scheme. So why am I still writing code in Factor? Well it turns out that the problem is also the attraction:
You can’t hack in factor.
In python you can hack out co ... Continue reading »

6 comments

  • I've used Factor in a class last year and my students were delighted to use it.
  • Hello, Phil --

    The solution to the problem you state so well about keeping track of stack contents is to document your code with stack diagrams! Ive been doing this successfully since the early 1980s with Forth. Not only does it help relieve the cognitive load while coding, it pays for itself a thousand times over when revisiting that code weeks or months later.
    --
    Don Groves
  • You've explained one of the major selling points of Factor for me. I like to learn a language by reading code that others have written. In a language with a lot of syntax, named variables, really long functions etc, it's really hard to figure out what was originally meant.

    By encouraging this factorisation, Factor is making it easier for me to understand what the original programmer *meant* when they wrote it.
  • I misspoke slightly in my previous post, what I meant to say was that I "comment" concatenative code with stack diagrams. For any non-trivial code, I comment each line that modifies the stack with a stack diagram.
    --
    Don Groves
  • There's a lot to be said for languages that make it hard to write bad code. Oh the painful, wasted hours I've spent wading through code in languages that make it easy. I like this effect in languages with bondage-and-discipline type systems in particular - it's neat when the penalty for writing bad code is having to document it rigorously enough to justify it to the type system.
  • Hi,

    Do you feel that your agility in Factor has improved since this post?

    Roger

Add New Comment

Returning? Login