Browse thread
compilation of lablgl examples.
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Jacques Garrigue <garrigue@k...> |
| Subject: | Re: compilation of lablgl examples. |
From: John Max Skaller <skaller@ozemail.com.au> [See John's post for his detailed expample] > I.e., polymorphic variants are more useful for prototyping, > since types do not need to be declared before writing > algorithms, yet the declarations can still be added later > when the design is solider to check just how solid it really is. > > At least, this is my expectation. For example, an 'expression' > type can be defined to include BOTH 'string name' and > 'name as integer index into symbol table', allowing > a single routine 'print expression', while it is still > possible to give a type for 'expression not containing > any string names' (to be used after all the names are bound). Well, theoretically yes, but do not forget that early type-checking plays a great role in making prototyping faster. Using polymorphic variants partly disables that, by delaying the check until the call point. This means that you may have a harder to understand where errors come from. I suggest you first check the concept on a small example before going for a full-fledge interpreter. By the way, I've wrote a paper (almost) on this subject. See it at http://wwwfun.kurims.kyoto-u.ac.jp/~garrigue/papers/ Cheers, Jacques Garrigue --------------------------------------------------------------------------- Jacques Garrigue Kyoto University garrigue at kurims.kyoto-u.ac.jp <A HREF=http://wwwfun.kurims.kyoto-u.ac.jp/~garrigue/>JG</A>