HaxeFoundation / haxe.org-comments

Repository to collect comments of our haxe.org websites
2 stars 2 forks source link

[haxe.org/manual] Module Sub-Types #128

Open utterances-bot opened 1 year ago

utterances-bot commented 1 year ago

Module Sub-Types - Haxe - The Cross-platform Toolkit

Haxe is an open source toolkit based on a modern, high level, strictly typed programming language.

https://haxe.org/manual/type-system-module-sub-types.html

alexeychikk commented 1 year ago

I don't understand what's the point of package keyword if the package always equals the name of the folder containing the source file? For example, I created the following structure:

src  
 |_inner
    |_MyModule.hx
 |_Main.hx

In MyModule.hx I declared package foo;. Now I can't import foo.MyModule in Main.hx. Compiler says Type not found : foo.MyModule.

Aurel300 commented 1 year ago

@alexeychikk See https://github.com/HaxeFoundation/haxe-evolution/issues/107 and https://github.com/HaxeFoundation/haxe/issues/6607.

Sedomanai commented 1 year ago

.. well that was a fun read. Anyway it's just one line I can live with it.