Skip to content

Commit 1ffc90e

Browse files
committed
Another solution for circular dependencies
Discussion: https://irclog.perlgeek.de/perl6-dev/2018-03-04#i_15882396
1 parent c1865cc commit 1ffc90e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

doc/Language/faq.pod6

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ and both stores it on disk, and uses the compiled bytecode. On subsequent
204204
loads, Rakudo prefers to load the bytecode, because that tends to be
205205
significantly faster.
206206
207-
=head2 Can I have circular dependencies?
207+
=head2 Can I have circular dependencies between modules?
208208
X<|Circular dependencies (FAQ)>
209209
210210
No, you can't have circular dependencies, and you should
@@ -222,6 +222,11 @@ one pass parsing. We have to know what A means when we parse B, and we
222222
have to know what B means when we parse A, which is clearly an
223223
infinite loop.
224224
225+
Note that Perl 6 has no “1 file = 1 class” limitation, and circular
226+
dependencies within a single compilation unit (e.g. file) are possible
227+
through stubbing. Therefore another possible solution is to move
228+
classes into the same compilation unit.
229+
225230
=head1 Language Features
226231
227232
=head2 How can I dump Perl 6 data structures

0 commit comments

Comments
 (0)