method-modifiers.xotcl

Clone Tools
  • last updated 5 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
- renamed tests/method-modifiers.xotcl to tests/method-modifiers.tcl - changed "require xotcl::test" to "... next::test"

  1. … 22 more files in changeset.
- updated migration guide - updated TODO

  1. … 3 more files in changeset.
- changed prefix from "::next::" to "::nx"

  1. … 21 more files in changeset.
- namespace changes: mostly due to marketing reasons, the naming of the top-level namespace changed from "xotcl2" to "next". reasons: xotcl is hard to pronounce for beginners, sounds like "exotic" (but who wants to program in an exotic language) has a certain stigma of strange namings (e.g. "instproc"), is seen as a precursor of tcloo, the top-level namespace ::xotcl2:: is not very nice either, the separation of framework and language is not clear.

We have now:

::next (the new object system, former ::xotcl2)

::next::core (framework, primitives)

::xotcl (former xotcl1)

- "::xotcl::use" no longer needed, use Tcl standard mechanisms instead

(e.g. "package req next"; "package req XOTcl", "namespace import ::next*")

  1. … 48 more files in changeset.
- support for method modifier "object", "protected" and "public" for method "attribute". One can use now e.g.

Class create C {

:attribute a

:public attribute b

:protected attribute c

:object attribute A

:public object attribute B

:protected object attribute C

}

"protected" and "public" refers to the registered accessor functions

  1. … 4 more files in changeset.
- experimental change of resolver name prefix char from dot to single colon

  1. … 16 more files in changeset.
- keep orignial objc/objc in call stack context such that next/self args works with canonical args (allow e.g. different order of nonpos args in a next) - make naming in xotcl.c more consistent - ensure to return empty, when "info callable -which" fails - extend regression test

  1. … 3 more files in changeset.
- modernize test a little: all local definitions of proc "?" are gone. - added interface to test: "Test parameter count SOMEVALUE" to specify conveniently e.g. the number of tests the be executed - add XOTCL_CM_NO_UNKNOWN to dispatch of defaultmethod

  1. … 13 more files in changeset.
- removed -per-object from ::xotcl::relation - removed -per-object from methods "mixinguard" and "filterguard" - removed -per-object from methods "alias" and "method" - added "... object filterguard ..." and "... object mixinguard ..." - implemented "info method definition" with "object" modifier - extended regression test

  1. … 9 more files in changeset.
- turned "setter" method into a command "::xotcl::setter" with the same interface like "::xotcl::alias" - removed flag -per-object from XOTclCForwardMethod - require "object" to be followed directly by either method defining command or info, etc. (use "public object method" instead of "object public method")

  1. … 10 more files in changeset.
- Definition of method modifiers "public", "protected" and "object" - all method-creating methods ("method", "alias", "forward", "setter") return now the fully qualified method names - extending 50 regression tests fpr method modifiers - Make "unknown" for ::xotcl2::Class" to raise an error instead of warning. Otherwise, protected class-level methods would create objects with the name of protected methods. Other option: make calls to protected methods raise an error, instead of calling "unknown"

    • -0
    • +159
    ./method-modifiers.xotcl
  1. … 8 more files in changeset.