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: | John Max Skaller <skaller@o...> |
| Subject: | Re: compilation of lablgl examples. |
Pierre Weis wrote: > May be it is my understanding of English which is bad, not your way to > write it :( I tend to write abbreviated idiomatic script flavoured by my native language (Strine :-) > > For example, something like this happens: > > the type of a function declaration in the Abstract Syntax Tree is: > > > > | AST_function of id_t * parameter_t list * typecode_t * statement_t > > list > > > > which is converted to: [] > > which is converted to: > > > > | BBDCL_function of bparameter_t list * btypecode_t * int list * > > bexe_t list * name_map_t > > This is very often considered good practice. However, I agree with you > that is can be heavy to code. Static typing today is not strong enough to express the actual typing, so there is always some compromise/balance between static and dynamic checking. I find it is difficult to engineer a good balance. Ideally, I could change that balance easily, however it is even harder to 'meta-engineer' code so that it is easy to change. > Sometimes you can use polymorphism to > help for instance defining > > | Function of 'parameter list * typecode_t * 'b > > could be used to modelize both > | DCL_function of parameter_t list * typecode_t * asm_t list > | BDCL_function of bparameter_t list * btypecode_t * int list * > exe_t list * name_map_t I'm not sure how: these two declarations are for variant components of _distinct_ types. [Try using variants .. ] > You should try on a small example, not on a huge optimizing compiler > for a full fledged language! Thats a good idea .. although I must say that Felix is not (yet) a 'huge' or 'optimising' compiler :-) -- John (Max) Skaller, mailto:skaller@maxtal.com.au 10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850 checkout Vyper http://Vyper.sourceforge.net download Interscript http://Interscript.sourceforge.net