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

Browse archivesActive forum topicsNew forum topics

Recent comments
2 hours 10 min ago
1 day 4 hours ago
3 days 23 hours ago
4 days 1 hour ago
4 days 12 hours ago
4 days 12 hours ago
5 days 45 min ago
5 days 14 hours ago
3 weeks 1 day ago
3 weeks 1 day ago