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

Browse archivesActive forum topics 
Recent comments
2 weeks 2 days ago
2 weeks 2 days ago
2 weeks 2 days ago
2 weeks 2 days ago
2 weeks 3 days ago
2 weeks 3 days ago
2 weeks 5 days ago
2 weeks 6 days ago
3 weeks 4 days ago
3 weeks 5 days ago