Re: [go-nuts] Remove vs Delete

2016-08-20 Thread Dave Cheney
Additionally in unix, where the name comes from, a file may have many names 
(many hard links to a directory entry) so remove in this case is removing a 
directory entry. Separately, when the link count of a file drops to zero, the 
file is now inaccessible as you cannot link to something that does not have a 
name. You could considered that deleted.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Remove vs Delete

2016-08-19 Thread Ian Lance Taylor
On Fri, Aug 19, 2016 at 3:51 PM, bep  wrote:
>
> I had this discussion with another Gopher about the difference between Delete 
> and Remove.
>
> I found this definition which I agree on:
>
> "Delete and remove are defined quite similarly, but the main difference 
> between them is that delete means erase (i.e. rendered nonexistent or 
> nonrecoverable), while remove connotes take away and set aside (but kept in 
> existence)."
>
>
>
> Translated to computer terms, remove would be to flag it/hide it, while 
> delete would be to delete it from disk/erease it.
>
> But then he mentioned:
>
> https://golang.org/pkg/os/#Remove
>
> I don't expect the os.Remove* funcs to ever be renamed, but wouldn't it be 
> more precise if they were named os.Delete etc.?

The function `os.Remove` does the same thing as the ISO C and POSIX
function `remove`
(http://pubs.opengroup.org/onlinepubs/009695399/functions/remove.html).
Perhaps the name Remove is a mistake, but it's a long-standing one.

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Remove vs Delete

2016-08-19 Thread Joel Eric
I have always considered add/remove to be a pair of keywords and insert/delete 
a pair of keywords so you could look at the method name used to place the item 
in storage originally

I will admit that I have very little rationale to back this premise up - it's 
more of a personal practice.  Overall I think you can use either method name 
and all will be fine.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Remove vs Delete

2016-08-19 Thread asit dhal
In computer programming, remove means to remove some elements out of many 
elements.
So, here you assume, there are many files in a container and when you you 
remove a file, one file disappears and others remain. The whole container 
remains the same.

delete/erase means to wipe out something completely. delete changes the 
attributes of the container.

These concepts are well implemented in STL.



Warm Regards,
Asit Dhal
http://bit.ly/193ASIT
On 8/20/2016 12:51:52 AM, bep  wrote:
I had this discussion with another Gopher about the difference between Delete 
and Remove.

I found this definition which I agree on:


"Delete [http://dictionary.reference.com/browse/delete] and remove 
[http://dictionary.reference.com/browse/remove] are defined quite similarly, 
but the main difference between them is that delete means erase (i.e. rendered 
nonexistent or nonrecoverable), while remove connotes take away and set aside 
(but kept in existence)."


Translated to computer terms, remove would be to flag it/hide it, while delete 
would be to delete it from disk/erease it.

But then he mentioned:

https://golang.org/pkg/os/#Remove

I don't expect the os.Remove* funcs to ever be renamed, but wouldn't it be more 
precise if they were named os.Delete etc.?

bep

--
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com 
[mailto:golang-nuts+unsubscr...@googlegroups.com].
For more options, visit https://groups.google.com/d/optout 
[https://groups.google.com/d/optout].

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Remove vs Delete

2016-08-19 Thread bep
I had this discussion with another Gopher about the difference between 
Delete and Remove.

I found this definition which I agree on:

*"Delete * and *remove 
* are defined quite 
similarly, but the main difference between them is that *delete* means 
*erase* (i.e. rendered nonexistent or nonrecoverable), while *remove* 
connotes *take away and set aside* (but kept in existence)."


Translated to computer terms, remove would be to flag it/hide it, while 
delete would be to delete it from disk/erease it.

But then he mentioned:

https://golang.org/pkg/os/#Remove

I don't expect the os.Remove* funcs to ever be renamed, but wouldn't it be 
more precise if they were named os.Delete etc.?

bep

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.