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.


[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.


[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.