5 ms·
I'd have to disagree with the title "Python meets C++". There's very few features that have been brought over from either of those languages. It looks like C
by akamaka 17y ago
I'd have to disagree with the title "Python meets C++". There's very few features that have been brought over from either of those languages.
It looks like C with some very carefully chosen additions: memory safety, concurrency and maps.
- mbrubeck 17y agoI agree. From the FAQ: "Go is mostly in the C family (basic syntax), with significant input from the Pascal/Modula/Oberon family (declarations, packages), plus some ideas from languages inspired by Tony Hoare's CSP, such as Newsqueak and Limbo (concurrency). However, it is a new language across the board." Two of the designers were Rob Pike and Ken Thompson, both instrumental developers of Unix/C and Plan9/Inferno. Thompson created the B programming language that C was based on.
- dhess 17y agoDon't forget Russ Cox, who I believe stuck with Plan 9 longer than either Rob or Ken. I'm excited to see CSP in Go. I've been advocating its use for concurrency since I learned about Plan 9's channels, but most people paid no attention.
- uriel 17y agoRuss still maintains 9vx and Plan 9 from User Space.
- ypavan 17y agoFrom the Tech Talk PDF, it is mentioned that Robert Griesemer, Ken Thompson, and Rob Pike started the project in late 2007. Ian Lance Taylor and Russ Cox joined in 2008. And the goal, as they mention, seems to have the efficiency of a statically-typed compiled language with the ease of programming of a dynamic language but with - Safety: type-safe and memory-safe. Good support for concurrency and communication. Efficient, latency-free garbage collection. High-speed compilation. They are aiming at a lightweight type system with no implicit conversions and no more 0x80ULL. A good starting point is their FAQ page and also the tech talk at youtube: http://www.youtube.com/watch?v=rKnDgT73v8s http://www.youtube.com/watch?v=rKnDgT73v8s
- dejv 17y agoSyntax looks like Pascal meets C++
- deleted 17y ago[deleted]
- chickamade 17y agoI'd say that name-based interface is indeed Pythonic. > Any type that has the named methods [...] is said to implement the interface. For instance, in the tutorial, the cat function takes a reader interface. fmt.Print and Println a type will output whatever its String() "method" output. This is what Python does, e.g. "print x" is eqv. to "print x.__str__()".
- silentbicycle 17y agoThat's not a Python thing - it was present in Smalltalk, for example.
- gloob 17y agoWell, if you're looking for features that Python was the first language to have, then I don't think Python has any "Python things". Garbage collection is still Pythonic, nonetheless.
- silentbicycle 17y agoIs it really useful or meaningful to claim every feature that Python has is "Pythonic", though? Are dicts "Pythonic"? Awk had them a decade earlier. Is garbage collection "Pythonic"? Lisp had it long ago. Dynamic typing? Generators? Etc. To my understanding (and admittedly, while I've been using Python since around 1.5, I've largely abandoned it for Lua), 'Pythonic' is usually used to refer to the clearly preferred way of doing something that may have multiple implementations - Python's community making explicit the observation of conventions such as "for (i=0; i<N, i++) {" in C. Using a dict rather than an int-indexed list is Pythonic, for example, because that's just the way that it's done in idiomatic Python, and the community encourages having one preferred idiom for common tasks. I don't think the concept applies to language features such as garbage collection.
- rsc 17y agoA much more interesting addition is the interface type and values.
- rbanffy 17y agoAs any pythonista would say: "from __future__ import braces"
- japherwocky 17y agogarbage collection also.. which is maybe the most "pythonic" thing they've worked in. look at all those semicolons and curly braces!