News for hackers. Stuff that matters.
Re:Half a decade with Go by claystu on Monday November 10, 2014 @06:01PM (#8587202)
What weaknesses of Pascal are being repeated in Go?
Re:Half a decade with Go by lmm on Tuesday November 11, 2014 @02:54AM (#8588786)
There is no escape. The language thinks it knows better than you. The standard library is allowed to do things that your code isn't.
Re:Half a decade with Go by _ak on Tuesday November 11, 2014 @06:06AM (#8589276)
Like what? The standard library is no more special, other than where it resides in the filesystem. You can write C and assembly code as well and link it to your Go code. And I'm not talking about cgo, I mean [568][ac], the Plan 9 C compiler and assembler that come with Go.
Re:Half a decade with Go by pjmlp on Tuesday November 11, 2014 @07:02AM (#8589404)
> Like what?

Maps, slices, the pre-defined functions.

More powerful languages make no big distinction between user defined types and the language provided ones.

Re:Half a decade with Go by lmm on Tuesday November 11, 2014 @07:00AM (#8589401)
I was thinking most obviously of generics. The go standard library is full of generic collections, but you're not allowed to use generics in your own code.
Re:Half a decade with Go by claystu on Wednesday November 12, 2014 @12:01AM (#8594099)
It looks like free pascal has generics: http://www.freepascal.org/docs-html/ref/refch8.html#refse46....

But to your larger point, doesn't any non-programmable programming language exhibit the same weakness to some extent?

Re:Half a decade with Go by lmm on Wednesday November 12, 2014 @05:55AM (#8594838)
Any language will have some "magic" things that are special-cased in the compiler - things like the basic integer datatypes, or the threading primitives - and probably a few more things that are implemented as C code (though if you're lucky this can be done in a "standard" way, through the language's FFI). But most of the standard library should be implemented in the language itself (look at e.g. the Java standard library, or the Python standard library. In a more coherent language like TCL, even language constructs may be written this way - e.g. "for" or "if" can be just ordinary methods. At the other extreme, PHP has the infamous T_PAAMAYIM_NEKUDOTAYIM, because a simple-seeming piece of syntax had to be special-cased in the parser). If the standard library authors kept feeling the need to step outside the language itself, that's a bad sign - it suggests the language is poorly suited to writing libraries in. But you're right that it's a question of degree rather than a binary thing.
Re:Half a decade with Go by _ak on Tuesday November 11, 2014 @07:52AM (#8589541)
That's not the standard library, though.
Re:Half a decade with Go by howeman on Tuesday November 11, 2014 @12:54PM (#8591155)
Actually, the c compiler just got deleted.

https://groups.google.com/forum/#!topic/golang-codereviews/A...