Saturday, April 30, 2005

More about constants

Constants implementation finished... It has been hard, because Freya must admit this kind of declarations:
const Pi = 3.14;
It is the constant type what's missing in this example, as it happens in Pascal. C# always requires the type declaration:
public const double Pi = 3.14;
Of course, Freya also admits this syntax:
const Pi: Double := 3.14;
The problem with implicit types in constants is that you face two challenges at the same time: finding the data type and then, evaluating the expression. It's already solved, but it could have been easier without this kind of declarations.

Labels:

2 Comments:

At 6:22 PM, Anonymous Anonymous said...

El código fuente de Freya ¿es open source?

 
At 4:19 PM, Blogger Ian Marteens said...

De momento, no. I'm not the only person involved in this project, so this is just my personal opinion: I don't see Freya as an open source "compiler", as far as I can see. Another totally different thing is the distribution model for the compiler, when finished. It's highly probable (I would say "almost sure") that the compiler will end up as a freeware executable.

 

Post a Comment

<< Home