Re: My scripting language - any suggestions?

lican <licaner@gmail.com>
Thu, 4 Sep 2008 04:59:35 -0700 (PDT)

          From comp.compilers

Related articles
[6 earlier articles]
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)
Re: My scripting language - any suggestions? ademakov@gmail.com (Aleksey Demakov) (2008-09-02)
Re: My scripting language - any suggestions? mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2008-09-02)
Re: My scripting language - any suggestions? licaner@gmail.com (lican) (2008-09-04)
Re: My scripting language - any suggestions? jaluber@gmail.com (Johannes) (2008-09-06)
Re: My scripting language - any suggestions? ademakov@gmail.com (Aleksey Demakov) (2008-09-07)
Re: My scripting language - any suggestions? bobduff@shell01.TheWorld.com (Robert A Duff) (2008-09-07)
Re: My scripting language - any suggestions? mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2008-09-08)
Re: My scripting language - any suggestions? felipeangriman@gmail.com (Felipe Angriman) (2008-09-08)
Re: My scripting language - any suggestions? sammyderoy@sympatico.ca (Sammy) (2008-09-10)
| List of all articles for this month |

From: lican <licaner@gmail.com>
Newsgroups: comp.compilers
Date: Thu, 4 Sep 2008 04:59:35 -0700 (PDT)
Organization: Compilers Central
References: 08-08-069 08-08-081 08-08-100 08-08-106 08-08-107 08-08-109 08-09-006 08-09-014
Keywords: types, OOP
Posted-Date: 05 Sep 2008 06:29:34 EDT

I think we're all getting a bit ahead of ourselfs. The thing is I
specify what type gets to be cast and when. The default to 100.0 + 1
would be 101.0, so as you see with flaot and int operation the default
type is float. If a programmer wants the operation done in a different
way, the person can do:


a = 100.0
b = 1;
s = "string text";
c = a.ToInt() + b; or c = (int)a + b; or c = a.To(int)
+ b;
d = s + a; // d == "string text100.0"


If you don't like the float I can make it double or even long double.
That really doesn't matter right now. I'll get to that while
implementing operators in the VM.


And please do remember that this is meant to be a scripting language
with dynamic typing, running on a VM. The will be no low level magic,
machine code generation. Just bytecode stuff. If you ever read the PHP
or Lua manual you should know what kind of predefined types exist
there, what are there limitations and how operators react given
certain types. Without operator overloading ClassA + ClassB will
always print an error 'cannot do something with this...'.




The thing is I just wanted to ask about general preferences when it
comes to the syntax. Also I'm interested if anyone can see any
penalties when it comes to the per block vs global/local scopes. Maybe
performace or any other problems. These are my problems as for now,
leave the conversion problem alone ;) As I said earlier it WILL be
predefined so that the user knows what to expect and when.



Post a followup to this message

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