User loginNavigation 
Designing a Type Notation for a Stack Based Functional LanguageI am designing a dialect of Joy called 'Big Cat'. Like Joy, Big Cat is a pure stack based functional language (or concatenative language, if you like the term). This means that every function takes a single stack as a parameter, and returns a new stack as a result. Most programs expect a certain stack configuration, so I am devising a syntax for expressing the desired type configuration. One of the changes is the introducction of a type notation for operations. Here is my current proposal: swap (T, U) => (U, T); dup (T) => (T, T); dupN (int, T) => (T*); pop (T) => (); popN (int, T*) => (); if (() => T, () => U, bool) => (UT); I welcome feedback, and suggestions. Let me know if the syntax is not intuitive and you need clarification, thanks! By cdiggins at 20060506 16:40  LtU Forum  previous forum topic  next forum topic  other blogs  7950 reads

Browse archivesActive forum topics 
Recent comments
8 hours 13 min ago
10 hours 48 min ago
1 day 12 hours ago
1 day 18 hours ago
3 days 7 hours ago
5 days 13 hours ago
6 days 9 hours ago
6 days 10 hours ago
1 week 10 hours ago
1 week 1 day ago