Re: My scripting language - any suggestions?

lican <licaner@gmail.com>
Fri, 29 Aug 2008 08:41:41 -0700 (PDT)

          From comp.compilers

Related articles
My scripting language - any suggestions? licaner@gmail.com (lican) (2008-08-25)
Re: My scripting language - any suggestions? jaluber@gmail.com (Johannes) (2008-08-27)
Re: My scripting language - any suggestions? lerno@dragonascendant.com (=?ISO-8859-1?Q?Christoffer_Lern=F6?=) (2008-08-27)
Re: My scripting language - any suggestions? licaner@gmail.com (lican) (2008-08-29)
Re: My scripting language - any suggestions? jaluber@gmail.com (Johannes) (2008-08-30)
Re: My scripting language - any suggestions? mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2008-08-31)
Re: My scripting language - any suggestions? ademakov@gmail.com (Aleksey Demakov) (2008-08-31)
Re: My scripting language - any suggestions? mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2008-08-31)
Re: My scripting language - any suggestions? licaner@gmail.com (lican) (2008-08-31)
Re: My scripting language - any suggestions? mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2008-09-01)
[9 later articles]
| List of all articles for this month |

From: lican <licaner@gmail.com>
Newsgroups: comp.compilers
Date: Fri, 29 Aug 2008 08:41:41 -0700 (PDT)
Organization: Compilers Central
References: 08-08-069 08-08-081
Keywords: interpreter, OOP
Posted-Date: 29 Aug 2008 12:38:34 EDT

Thanks. As Johannes said it's rather a matter of taste if someone
wants to declare variables with or without a keyword. I'm also aware
that depending on the method of declaration the scope matter will be
rather straightforward. I think I'll go with the var keyword. And as
for class fields declaration like "public someVar;" would be
sufficient, without "var publiuc someVar;". Also this kind of solves
the scope problem. I chose the per-block type. Also forgot to write
that I am in fact planning to do something like
"a.is_array();" (almost pure OO). The same for strings and any other
class:


[code]
s = "some text";
if( s.Length() < 5 )
      s.Replace('s','t');


if( s.Is(string) )
      // sth
[/code]


ect. I believe it would look (and work) better. I read somewhere
(don't remember where really) that there's no significant difference
when it comes to bytecode verification. It's generally done by a
separate (slower) bytecode reader - interpreter. Some time ago I read
that paper you sent Christoffer (also a similar paper can be found on
the Lua page regarding their transition from stack to register VM).
They claim that the register one is faster so I'll go with that. I
have some spare time now so I'm willing to experiment.


The OO code is one of my priorities. I think that even the simple
types like int should have some class for let's say conversion (a = 5;
a.ToFloat()) and such. It really simplifies some things like
a.ToFloat().Floor().ToString() all done in one line ;) I know it's an
extreme example, but I think you get my point.
ToString(Floor((float)a)) doesn't look so good (or maybe it's also a
matter of taste). To be honest I never really heard of class clusters,
but surely I'll look into it.


Thanks for your help.


Mark


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.