Co-founder of Phusion, developer of the Passenger application server for Ruby, Python and Node. Passionate about web development and computing infrastructure.
wat betreft je programma: hij doet niet wat je wilt omdat b een lokale variabel is.
met &b wilde je eigenlijk een pointer pakken naar een entry binnen a. maar je hebt in feite een pointer gepakt naar de lokale variabel b.
die b wordt gemuteerd door de range call, en de laatste mutatie zet de waarde van b op 9. daarom print het programma alleen maar 9
probeer dit eens:
// Fill the pointer slice with the contents of the int slicefori, _:=rangea {
pa=append(pa, &a[i])
With the new SpawningKit subsystem, we have laid the foundations for generic language support. Some time in the near future would be a good time to implement the remaining parts. This document proposes a possible user experience for generic language support, and based on this UX it describes an implementation direction.
Preface: intended audience
This proposal is specifically targeted at Phusion employees in order to receive feedback on the UX and on the implementation strategy. Section 1 equips the reader with the proper background knowledge to give such feedback.
The status of generic language support is that the lowest layer (SpawningKit) is done. With section 2 of this document, I hope to define the highest layer (the UX). Once that has been properly defined, all that would be left is to figure out how to fill the gaps in between: how to code the things on top of SpawningKit to make us achieve the defined UX. This multi-step approach should be a lot easier an