Post by cbrescia on Nov 7, 2007 8:48:18 GMT -5
The chicken egg problem
The compiler does not get much attention by people so no more updates
Since there are no more updates to improve the compiler it does not get more people attention.
Thistle is a beautiful language because it has very few commands but it deserves some more keywords like Wait or Timer(seconds),
window menus and some keyboard control but this are major improvements.
May be these are minor ones.
1) the compiler manages integers, why not allow a numberbox with negative numbers? only 0..9 digits are allowed. Otherwise it only manage natural numbers.
2) I think that actually Thistle is a macro preprocessor that relies on FASM to do the compilation, this technique is used to create faster programs, every time you write a function the code generated is the same again and again, but today is worth it?
I think it can be improved easily, actually it can be done at high level code, in spite it does not manage local parameters, global ones can be used without gosub recursion only in those functions that don't involve control handlers such as Setfocus(controlhandler).
That is because the compiler consider a controlhandler of a type which has no variables of that kind allowed.
Would it be easy to permit integer handlers as many compilers do, to workaround that problem and wrap keywords with control handlers parameters?.
Here it is an example that does nothing interesting except to notice this feature.
stringcompare1.thw
window win, "Example",10,10,575,430;
endgui;
string pS1,pS2;
int pI1;
int i=0,result;
do while i<5;
pS1="human";pS2="machine";gosub StCmp;result=pI1;
i=i+1;
loop;
sub StCmp;
stringcompare pS1,pS2,pI1;
endsub;
'compiled it has 6 Kb, export to FASM to see the code
There are not needed many variables to do this wrapping four global string and four integers variables to wrap all the functions are enough
stringcompare2.thw
window win,"Example",10,10,575,430;
endgui;
int res;
stringcompare "machine","human",res;
stringcompare "machine","human",res;
stringcompare "machine","human",res;
stringcompare "machine","human",res;
stringcompare "machine","human",res;
'compiled it has 9 Kb, export to FASM to see the repeated code
This comment is because people like small programs. For instance the Contact program sample compiled has 241 Kb and it
would be 20-30Kb in size with function calling wrapping
Thistle compiling smaller programs and publishing it in FASM sites, could get more attention to programmers and shall break the circle...
cbrescia
The compiler does not get much attention by people so no more updates
Since there are no more updates to improve the compiler it does not get more people attention.
Thistle is a beautiful language because it has very few commands but it deserves some more keywords like Wait or Timer(seconds),
window menus and some keyboard control but this are major improvements.
May be these are minor ones.
1) the compiler manages integers, why not allow a numberbox with negative numbers? only 0..9 digits are allowed. Otherwise it only manage natural numbers.
2) I think that actually Thistle is a macro preprocessor that relies on FASM to do the compilation, this technique is used to create faster programs, every time you write a function the code generated is the same again and again, but today is worth it?
I think it can be improved easily, actually it can be done at high level code, in spite it does not manage local parameters, global ones can be used without gosub recursion only in those functions that don't involve control handlers such as Setfocus(controlhandler).
That is because the compiler consider a controlhandler of a type which has no variables of that kind allowed.
Would it be easy to permit integer handlers as many compilers do, to workaround that problem and wrap keywords with control handlers parameters?.
Here it is an example that does nothing interesting except to notice this feature.
stringcompare1.thw
window win, "Example",10,10,575,430;
endgui;
string pS1,pS2;
int pI1;
int i=0,result;
do while i<5;
pS1="human";pS2="machine";gosub StCmp;result=pI1;
i=i+1;
loop;
sub StCmp;
stringcompare pS1,pS2,pI1;
endsub;
'compiled it has 6 Kb, export to FASM to see the code
There are not needed many variables to do this wrapping four global string and four integers variables to wrap all the functions are enough
stringcompare2.thw
window win,"Example",10,10,575,430;
endgui;
int res;
stringcompare "machine","human",res;
stringcompare "machine","human",res;
stringcompare "machine","human",res;
stringcompare "machine","human",res;
stringcompare "machine","human",res;
'compiled it has 9 Kb, export to FASM to see the repeated code
This comment is because people like small programs. For instance the Contact program sample compiled has 241 Kb and it
would be 20-30Kb in size with function calling wrapping
Thistle compiling smaller programs and publishing it in FASM sites, could get more attention to programmers and shall break the circle...
cbrescia