Front Page All Articles Recent Changes Random Article

Contents

Concatenative language

  • ACL
  • Ait
  • Aocla
  • Breeze
  • Callisto
  • Cat
  • Cognate
  • colorForth
  • Concata
  • CoSy
  • Deque
  • DSSP
  • dt
  • Elymas
  • Enchilada
  • ETAC
  • F
  • Factor
  • Fiveth
  • Forth
  • Fourth
  • Freelang
  • Gershwin
  • hex
  • iNet
  • Joy
  • Joy of Postfix App
  • kcats
  • Kitten
  • lang5
  • Listack
  • LSE64
  • Lviv
  • Meow5
  • min
  • Mirth
  • mjoy
  • Mlatu
  • Ode
  • OForth
  • Om
  • Onyx
  • Plorth
  • Popr
  • Porth
  • PostScript
  • Prowl
  • Quest32
  • Quackery
  • r3
  • Raven
  • Retro
  • RPL
  • SPL
  • Staapl
  • Stabel
  • Tal
  • Titan
  • Trith
  • Uiua
  • Worst
  • xs
  • XY
  • 5th
  • 8th

Concatenative topics

  • Compilers
  • Interpreters
  • Type systems
  • Object systems
  • Quotations
  • Variables
  • Garbage collection
  • Example programs

Concatenative meta

  • People
  • Communities

Other languages

  • APL
  • C++
  • Erlang
  • FP trivia
  • Haskell
  • Io
  • Java
  • JavaScript
  • Lisp
  • ML
  • Oberon
  • RPL
  • Self
  • Slate
  • Smalltalk

Meta

  • Search
  • Farkup wiki format
  • Etiquette
  • Sandbox

Factor/Coding Style

Source files

Tabs are not allowed in Factor source files; use four spaces instead.

Try to limit lines to 64 characters, except for documentation, which can be any length.

Most word definitions should fit in three or fewer 64-column lines.

Short definitions can be on one line, while longer ones should be split up over several lines.

Words definitions should fit on one to three lines if possible, with the exception of words that use case and cond or literals. If the words are aptly named and definitions kept short, your code will be mostly self-documenting.

Instead of excessively long comments, favor readable word names and use the Help system for longer explanations of how words work.

Code

Factor words should be named-with-dashes instead_of_underscores or CamelCase.

Any copy/pasted code should be factored out into new words.

Use combinators to abstract control flow patterns.

Use library words where possible.

More general words should go at the top of a file; more specific at the bottom.

Try to use collections instead of working with individual objects on the stack.

Don't use the datastack as a data structure.

Use meaningful word names. Avoid too many words named (foo) or foo*.

A word named (foo) should only exist to help implement the word foo.

Come to the Concatenative IRC channel and we'll review your code. It's fun!

This revision created on Wed, 2 Nov 2011 12:31:56 by theom (Add a link to the IRC channel)

Latest Revisions Edit

All content is © 2008-2024 by its respective authors. By adding content to this wiki, you agree to release it under the BSD license.