I totally agree Michael - there is no need to remove a level of general use
utility by making this method have to actually assign an id to an object.
The dev can handle doing whatever he wants with the newly gotten id...
someElement.id = $getId();
var newId = $getId("foo");
...do something with newId that may or may not involve assigning it to
something (who knows what this dev needs it for)
On 7/19/07, Michael Peters <[EMAIL PROTECTED]> wrote:
>
>
> Ken Snyder wrote:
>
> > Brainstorming in specifics, what about a method called
> > Object#assignGuid? After all, we are reading/writing a property of an
> > object.
>
> Why does this method have to assign the id to anything? Why can't it just
> create
> the id and return it? Then we could use it however we wanted. And if the
> most
> common use case is to assign as an elements id attribute, then we could
> also
> create the Element.identify() method that uses this
> static-uid-generating-method-thingy-with-no-name-yet.
>
> Also, guid is bad since the g stands for "globally", which it isn't. It's
> not
> unique to anything but the current page right? When I think of a guid I
> think of
> it being unique not just to the currently running context, but for any and
> all
> contexts in the future.
>
> --
> Michael Peters
> Developer
> Plus Three, LP
>
>
> >
>
--
Ryan Gahl
Manager, Senior Software Engineer
Nth Penguin, LLC
http://www.nthpenguin.com
--
Architect
WebWidgetry.com / MashupStudio.com
Future Home of the World's First Complete Web Platform
--
Inquire: 1-262-951-6727
Blog: http://www.someElement.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---