{"id":40388380,"url":"https://github.com/tcltk/tcloo","last_synced_at":"2026-01-20T12:32:52.540Z","repository":{"id":5665677,"uuid":"6875152","full_name":"tcltk/tcloo","owner":"tcltk","description":"Tcl OO Package (for Tcl 8.5, integrated in 8.6). (Mirror of core.tcl-lang.org) ","archived":false,"fork":false,"pushed_at":"2016-04-20T08:03:08.000Z","size":4491,"stargazers_count":18,"open_issues_count":0,"forks_count":12,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-05-09T11:12:48.711Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://core.tcl-lang.org/tcloo/","language":"C","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tcltk.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":null,"license":"license.terms","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-11-27T00:41:41.000Z","updated_at":"2023-11-26T14:21:39.000Z","dependencies_parsed_at":"2022-08-24T17:10:47.599Z","dependency_job_id":null,"html_url":"https://github.com/tcltk/tcloo","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/tcltk/tcloo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcltk%2Ftcloo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcltk%2Ftcloo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcltk%2Ftcloo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcltk%2Ftcloo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tcltk","download_url":"https://codeload.github.com/tcltk/tcloo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcltk%2Ftcloo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28603392,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T12:01:53.233Z","status":"ssl_error","status_checked_at":"2026-01-20T12:01:46.545Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-20T12:32:52.490Z","updated_at":"2026-01-20T12:32:52.533Z","avatar_url":"https://github.com/tcltk.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"Release of TclOO Version 1.0.4\n==============================\n\nThis officially corresponds to the version of TclOO that is included with Tcl\n8.6.5, except for features (notably coroutine support and bytecode compilation\nof some commands) that require the 8.6 runtime.\n\nTclOO: An Object System for Tcl\n===============================\n\nTclOO is an object system for Tcl that has been designed to provide high\nperformance while still allowing as much flexibility as possible, and to be a\ncore for other object systems. It supports a single-rooted class-based object\nsystem where classes are themselves subclassable objects, with multiple\ninheritance, mixins, procedure-like and forwarded methods, filter methods,\ndynamic reconfiguration, etc.\n\nIt does not come with a large class library, and it does not force its use\nupon user scripts. Some of the packages in Tcllib use TclOO, but these may be\ndependent on other Tcl 8.6 features.\n\nThe heritage of TclOO can be traced back to a number of other object systems,\nnotably including XOTcl, incr Tcl, and Snit. It also draws on experience with\nobject systems in other languages like C++, Java and Ruby (despite being\nsomewhat different from each of them).\n\nChanges in TclOO 1.0.4\n----------------------\n* TIP #436 \u003chttp://tip.tcl.tk/436.html\u003e was implemented, which makes `info\n  object isa` not produce errors when presented with non-objects.\n\n* Various bugs in class destruction were addressed.\n\nFor a full description of all changes, see:\n\n* \u003chttp://core.tcl.tk/tcloo/timeline?from=release-1.0.2\u0026to=release-1.0.4\u003e\n\nNote that there were no meaningful changes in 1.0.3.\n\nBuilding\n--------\n\nTclOO 1.0.4 uses the TEA3 build system. These instructions are known to work\non Linux, OSX and Windows (with msys installed).\n\n1. Make sure you have a source distribution of Tcl 8.5 somewhere; you will\n   need it to build TclOO. (Note that this functionality is incorporated\n   directly into Tcl 8.6; you do not need this package with that version.)\n\n2. Run the configure shell script in this directory. You may well want to\n   use the `--with-tcl` option to tell the script where to find Tcl's build\n   descriptor. Using the `--prefix` option to specify where to install the\n   built version is also often useful.\n\n3. Run '`make`'.\n\n4. Run '`make test`'. There should be no test failures, but some memory stress\n   tests are not run under normal conditions as they require a special build\n   of Tcl.\n\n5. Run '`make install`'. You might need to get elevated privileges to do this\n   (e.g. by using '`sudo`') to install in a shared area.\n\nSupport\n-------\n\nPlease file bug reports, feature requests and patches on core.tcl.tk under the\nTcl package. \u003chttp://core.tcl.tk/tcl/tktnew\u003e To ensure attention from the\nrelevant maintainer, please use \"35. TclOO Package\" for the Category field.\nRemember, it is better to file a bug report twice than not at all!\n\nBasic Usage of TclOO\n====================\n\nAdding up values with TclOO:\n\n    oo::class create summation {\n        variable v\n        constructor {} {\n            set v 0\n        }\n        method add x {\n            incr v $x\n        }\n        method value {} {\n            return $v\n        }\n        destructor {\n            puts \"Ended with value $v\"\n        }\n    }\n    set sum [summation new]\n    puts \"Start with [$sum value]\"\n    for {set i 1} {$i \u003c= 10} {incr i} {\n        puts \"Add $i to get [$sum add $i]\"\n    }\n    summation destroy\n\nToasting bread with events and TclOO:\n\n    oo::class create Toaster {\n        variable toasting time\n        constructor {toastingTime} {\n            set time $toastingTime\n            set toasting \"\"\n        }\n        method toast {breadProduct} {\n            if {$toasting ne \"\"} {\n                error \"already toasting something\"\n            }\n            set toasting [after $time [namespace code [list \\\n                    my Toasted $breadProduct]]]\n            puts \"toasting $breadProduct for you\"\n        }\n        method Toasted {breadProduct} {\n            puts \"toasted the $breadProduct\"\n            set toasting \"\"\n        }\n        destructor {\n            after cancel $toasting\n        }\n    }\n    \n    Toaster create quickToaster 30000 ;  # 30 seconds only\n    quickToaster toast crumpet\n    \n    after 40000 {set done ok}\n    vwait done ;                         # Run the event loop\n    \n    quickToaster destroy ;               # Delete the object\n\nCompatibility Warnings\n======================\nNames of classes, methods or variables that begin with a hyphen can now cause\nissues with some definitions (i.e., they are reserved to slotted operations).\nThe fix is to precede the name with a \"`--`\" argument in the problem definition;\nsee the `oo::define` documentation for the affected definitions.\n\nMethod names that are proper multi-element lists are reserved for future\nfunctionality.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftcltk%2Ftcloo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftcltk%2Ftcloo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftcltk%2Ftcloo/lists"}