For #1 -- There is a reason for this, I could try to explain it but I 
believe a guy named Todd McLeod would explain it 
better: https://www.youtube.com/user/toddmcleod/search?query=slice

For #2 -- Go is easily extendable.  My suggestion if you want a find, write 
one.   I know that kinda sounds harsh but it's a great way to learn the 
language by writing your first extension that you can import with each 
project. 



On Monday, August 7, 2017 at 10:23:57 AM UTC-4, marti...@programmfabrik.de 
wrote:
>
> Being fairly new to Go, I am trying to evaluate if it s possible and worth 
> to move our huge C++ codebase over to Go.
>
> 1) append(sliceA, my_new_item) sliceA
>
> Why can I not append something to a Slice in place, why does it have to 
> return a new Slice?
>
> 2) find(sliceB, item_i_look_for) int, -1 for not found
>
> Why can I not find easily search for an item inside a Slice. Every other 
> language I know has this. And I need this in a generic form.
>
> Or am I missing something entirely here?
>
> Best
> Martin
>
>

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

Reply via email to