summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <daniel@octaforge.org>2019-10-18 07:48:20 -0700
committerwww-data <www-data@enlightenment.org>2019-10-18 07:48:20 -0700
commit77b24c43cd34aa9564efb7d63fe10667567d24c2 (patch)
tree3994332cd6a205036b05971446cdec65f6de4665
parentf433eebd2babcbf4ee346bd98266b0c668900753 (diff)
Wiki page eo.md changed with summary [some beta transition hints] by Daniel Kolesa
-rw-r--r--pages/contrib/docs/eo.md.txt85
1 files changed, 84 insertions, 1 deletions
diff --git a/pages/contrib/docs/eo.md.txt b/pages/contrib/docs/eo.md.txt
index b38bf3c..fe1a1b9 100644
--- a/pages/contrib/docs/eo.md.txt
+++ b/pages/contrib/docs/eo.md.txt
@@ -647,4 +647,87 @@ You can find handy syntax highlighting config files for different editors [here]
647 values { 647 values {
648 smooth_scale: bool; [[Whether to use smooth scale or not.]] 648 smooth_scale: bool; [[Whether to use smooth scale or not.]]
649 } 649 }
650 } \ No newline at end of file 650 }
651
652## Beta-only features and transitioning old Eo files
653
654### Pointers
655
656Old Eolian had a pointer syntax `ptr(T)`. Example:
657
658```
659param: ptr(Some.Struct);
660```
661
662This syntax is currently working in beta-tagged APIs for transition purposes,
663but should not be used in stable API. What you should use instead is the new
664`@by_ref` tag. It applies in multiple contexts:
665
666```
667return: T @by_ref;
668@in param: T @by_ref;
669struct_field: T @by_ref;
670```
671
672### Enum legacy field
673
674Old Eolian used to allow the `legacy` keyword to be used in enums to set
675the C prefix. This was a misnomer.
676
677```
678enum Foo {
679 legacy: BAR;
680 ...
681}
682```
683
684There is no replacement for this feature.
685
686### Owning
687
688The old `@owned` tag is now called `@move`.
689
690### Freeing functions
691
692Old Eolian used to allow `free(T, func)` to specify freeing functions on
693arbitrary types. It also had default fallbacks for freeing certain builtins.
694This is not allowed by modern Eolian. No builtins are offered (the generator
695is supposed to know them) and specifying custom freeing functions is only
696allowed on structs (with the same old `@free(func)` syntax).
697
698### Disallowed types
699
700There are some types allowed in beta but not allowed in stable.
701These include `__undefined_type`, `hash<K, V>`, `void_ptr`.
702
703### Inheritance syntax
704
705Old Eolian specified inheritance all in a single section like this:
706
707```
708class Foo(Bar, Baz, ...)
709```
710
711New Eolian has sections:
712
713```
714class Foo extends Bar implements Baz, ... composites ...
715interface Foo extends Bar, Baz, ... composites ...
716mixin Foo requires Bar extends Baz, ... composites ...
717```
718
719### Composites section
720
721This is now specified in the inheritance part instead of a section in the
722class body. Putting an interface in the composites section also automatically
723puts it in implements/extends if it isn't already found in the inheritance tree.
724
725### Misc renames
726
727The `any_value_ptr` builtin is now called `any_value_ref`.
728
729### Other notes
730
731Generally, the Eolian parser will guide you through transitioning. You can
732more or less assume that if the parser does not error, your Eo file should
733be all right; otherwise, error messages should tell you what's wrong. \ No newline at end of file