Bare package declaration?

I posted a question to stackoverflow, and thought it would be useful to mention it here:

Incidentally, I wonder if there’s a way to automatically get a forum post here any time a Haxe question is asked over at SO.

Posting questions at SO gives Haxe some more visibility, but I don’t visit there very often.

(edited s/SA/SO/, thanks)

What’s SA? Stack Averflow? Stack Axchange? :slight_smile:

1 Like

I answered on stackoverflow:

package; communicates that you are so-called “top-level”, that means, you are not actually in a package.
You can leave it out, so this will work too:

class Main {

If you are in a package, it is required to define the type path at the top of the file, eg. package >; (where is a folder foo/bar in a source path, defined by -src )

More info Modules and Paths - Haxe - The Cross-platform Toolkit

1 Like

Ah, thanks!