On 3/13/21 5:27 PM, 'Axel Wagner' via golang-nuts wrote: > > I'm once again not sure what your objective is here. No one is trying to argue > that it is impossible to introduce semantics like you propose. > We are only trying to give you the reasons why that's currently not done. > > You can always file a proposal to change the semantics. But I would strongly > suggest to a) get acquainted with the reasons given to you for why maps work > the > way they do and b) have good answers ready when they come up in the > discussion. > At least better answers than just dismissing them. If your only response to > someone saying that performance would suffer to much if we had to allocate a > map > for every zero value is "that is performance nonsense", my prediction is that > your proposal would not get very accepted.
That was not my answer or "only response"! >> If you are doing something a billion times then whatever you are doing is >> more expensive than allocating a zero map. You can also avoid that return if >> really necessary, which I doubt. It is right for optimisation steps to >> increase, over run of the mill stuff. e.g. append vs array >> Nonsense around performance is the reason that c sucks. perhaps I should have said, nonsense by default, but it is inferred from context > Lack of "nonsense around performance" is also the reason why many people use > Go instead of, say, Python. Whilst you have wrongly called some things in this thread irrelevant. That is irrelevant to this discussion as the reasons that Python is slower have very little to do with this discussion. Whilst issues like this and ones already fixed by go, do pertain to c. I shall see if the staticcheck SA5000 linter can be improved to track returns or submit a proposal at some point or wait for null safety to fix this issue. -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/3f7e04d7-b18d-6d05-8d7f-eaa04b79c368%40gmail.com.