I'm hearing you Scott :)
In general I see a lot of need from people for reflection and be able to
"print" things at runtime.
I'll then try to focus several aspects on the language on this point.
Functions an enum infos are quite easy to do, so no problem here.
Profiling is also interesting, will add it too.
Bit operations on enums are tricky since ( vala | valb ) is not a correct
enum value. Even if they is high chances that enums will be integers at
runtime, there is no warantee that they will (actually if we want them to
carry a printer they will most likely be objects).
I'll also add the switch :
switch expr {
blue =>
...
red =>
...
}
If it doesn't have a "default" and if all the possible values of the
enumeration are not handled then it will print a warning.
This is a very ML type system since the enum cannot carry values, it's not
then real pattern matching as requested by Ralf, but that's already
something and maybe will be able to extend it in the future while trying to
keep it simple.
Nicolas
----- Original Message -----
From: "Scott Hyndman" <[EMAIL PROTECTED]>
To: "Open Source Flash Mailing List" <[email protected]>
Sent: Friday, October 28, 2005 8:14 AM
Subject: Re: [osflash] New Language RFC
It's looking good,
A quick note on enums,
I'd like to be able to assign enum elements numeric values, and also treat
them as such (like being able to perform bitwise operations on them). It
would also be nice if an enum element's default toString would output its
name, and the name of the enum to which it belongs.
Scott
-----Original Message-----
From: [EMAIL PROTECTED] on behalf of Nicolas Cannasse
Sent: Thu 10/27/2005 5:58 PM
To: [email protected]
Cc:
Subject: [osflash] New Language RFC
Hi folks,
The new still-unamed language specifications have been updated at
http://ncannasse.free.fr/files/flexible.html . It now includes enumerators,
Dynamic type parameters and a beginning of grammar rules.
I would like to get comments about the design of the language : what are the
features you've been dreaming about ? How should look for you the language
you'll be happy to write in everyday at work ?
It's an open discussion, so bring your ideas in . I have my own ones, but I
think opening the design to everybody will result in a better result in the
end.
Have fun !
Nicolas
_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org
----------------------------------------------------------------------------
----
> _______________________________________________
> osflash mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/osflash_osflash.org
>
_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org