Closed gwadej closed 9 years ago
The subtle and confusing difference between include
and use
indicated that something was wrong with the design.
I started over from scratch. There is still a use
operator, but the meaning and purpose are now quite clear. Objects.md is restructured a bit.
The new use syntax sort of reminds me of the equivalent in Perl 5.
This approach also has the advantage of changing the implicit behavior difference of include/use into something more explicit. Much better idea.
I'm still a bit unclear on the difference between include and use.
If I have a file 'foo.scad' that creates a function bar(), it sounds like there is a difference between the following two cases, but I'm not sure what it is:
include script( "foo.scad" );
bar(x) = 5*x;
use script( "foo.scad" );
bar(x) = 5*x;
And I understand that both are different than
foo = script( "foo.scad" );
bar(x) = 5*x;