[sac-user] SaC beginner: modularization, declaration

Juhasz David juhda at inf.elte.hu
Wed Dec 8 14:50:26 CET 2010


Hi,

I'm participant of a project in Eötvös Loránd University, Hungary. In this 
project we want to develop a general programming language for multicore 
and distributed systems, wich is not hardware-specific, but can make an 
effective code from the source. My actual assignment is to write a summary 
about SaC and its compiling issues. There are useful papers on SAC 
homepage. But as I can see, the module subsystem section doesn't reflect 
the current syntax for modularization. So I have two questions about this 
topic:
* What is the difference between the use and the import instructions?
* How is it possible to define uniqueness type explicitly? Classtypes are 
  uniqueness, but I'd like to define uniqueness types on a general way.

And one more question about variable declaration. I don't know that it's a 
bug or just I don't understand the impact of declarations. Consider the 
following example:

import Array: all;
import StdIO: all;

typedef int[1] array;

int main()
{
	array x;
	x = 10;

#ifndef EXCLUDE_ERRORS
	print(x);
#endif

	return(0);
}

Without the print there is no error, but with the print there is a typing 
error for the assignment. I wonder, why succeed the compiling without the 
print. What's the matter in this case? If this is actually a bug, I'll 
report it more detailed in SaC-Zilla.

Thanks for any advice!

Best regards,
David


More information about the sac-user mailing list