Talk:Create an object/Native demonstration

Revision as of 23:19, 16 February 2011 by rosettacode>Dingowolf (→‎wrong name?: explain)

It is not yet considered ready to be promoted as a complete task, because I'm not a native English speaker, my task description may cause misunderstanding. Hope that is a minimium, thanks. dingowolf

Tcl omitted

I marked this task as an omission for Tcl because the value system and object system in that language do not interact in a way that is necessary to support the prerequisites of this task. In particular, native dicts and arrays are not objects in the sense this task assumes, and Tcl's objects formally occupy part of the space of functions and commands, and not values or variables. –Donal Fellows 08:38, 20 October 2010 (UTC)

I am not sure that that was the right choice here. The task is titled "Create an Object/Native ...", and while TCL might not have objects it certainly has native stuff? Anyways, this site has always been about closest approximations (though I have been known to quibble about where we draw the boundaries on those issues). --Rdm 12:46, 20 October 2010 (UTC)

wrong name?

I think this task might have the wrong name. It might be better to call it "immutable map" or something like that. It's not so much a demonstration of creating an object and "native demonstration" doesn't make sense to me. --Mwn3d 22:31, 16 February 2011 (UTC)

Sorry to causing misunderstanding. I think Ruby's demonstration match, and in fact correct, my idea. The object requirements should be 1. No new KEY could be added, and KEY set at initialization cannot be removed ; 2. VALUE can be modified and can be reset (by method delete/reset/clear etc. whatever appropriate in the language) to DEFAULT VALUE which has been set at initialization. But the object creation task is just a means to expose those Magic Method, which is the real goal of this task. For example, one can make a hash class object that access values by key by using a method getValueByKey, or by using a Native(?) method, for example in D, opIndex. It is this opIndex that I called Magic Method. I cannot express my idea well :( dingowolf 23:19, 16 February 2011 (UTC)
Return to "Create an object/Native demonstration" page.