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  8024 reads

Browse archivesActive forum topicsNew forum topics 
Recent comments
4 hours 20 min ago
10 hours 43 min ago
10 hours 52 min ago
11 hours 13 min ago
1 day 10 hours ago
2 days 14 hours ago
6 days 15 hours ago
1 week 6 days ago
1 week 6 days ago
2 weeks 5 hours ago