15 Apr 10:57
Brave new world
From: Eduardo Cavazos <wayo.cavazos@...>
Subject: Brave new world
Newsgroups: gmane.comp.lang.factor.general
Date: 2008-04-15 09:00:29 GMT
Subject: Brave new world
Newsgroups: gmane.comp.lang.factor.general
Date: 2008-04-15 09:00:29 GMT
Hello, One of the onions in Factor world (to me anyway) has been the dilemma of finding the "one true effect". Even when you find the supposed "one true effect", there are still exceptional cases which require an accompanying shuffle word. Another dilemma has been finding a "grand unified theory of stack effects"; a sort of philosophy behind the effects which would inform the design of future words. I'm going a different route, embracing the diversity of effects instead of rejecting it. The way down this route is to give names to each variant. The following generic words work on sequences and tables (assocs): ---------------------------------------------------------------------- GENERIC: at ( col key -- val ) GENERIC: of ( key col -- val ) ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! GENERIC: grab ( col key -- col val ) ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! GENERIC: is ( col key val -- col ) GENERIC: as ( col val key -- col ) ! "Store value as key"(Continue reading)
RSS Feed