On Wed, May 9, 2018 at 7:01 PM Robert Griesemer wrote:
> I think we also have been hesitant to simply disallow "cyclical types"
(per your definition of cyclical) in the spec because we (or at least I)
don't have a good understanding that our code actually detects exactly
those. We have plenty of
On Wed, May 9, 2018 at 7:45 PM Robert Griesemer wrote:
> PS: Here's an example where we (humans) can obviously compute the size of
a type, yet neither cmd/compile, gccgo, nor go/types have any success in
doing so:
>
> type T struct {
> a [10]int
> b [len(T{}.a)]int
> }
> The prob
This modified example from another thread does not compile:
package main
import (
"fmt"
)
type T int
func main() {
var v T
type T *T
var w T
w = &v
*w = v
The error seems correct to me. From the spec:
"The scope of a type identifier declared inside a function begins at
the identifier in the TypeSpec and ends at the end of the innermost
containing block."
So the type declaration in main is a recursive type - the T it refers
to is not the previously
I think the only real problem here is the lack of do {} while and
even this is not a big problem. I think we can happily live with the
solution pointed by Sokolov, which is the one I use when needed. But
looking at this thread what pops up is that the lacking of this construct
at the language
The lack of citations makes the content untrustworthy to me, but this
English Wikipedia article on loops claims some history starting with the do
loop in FORTRAN (1957): https://en.wikipedia.org/wiki/For_loop
This article says the three part for loop was introduced in C/C++ (1972),
and containe
Maybe the central issue here has been lost because of the confusion between
English words and the keywords of various languages. Let's be explicit: *a
controlled looping construct may test the control condition before or after
the iterated body of code. Go's 'for' tests before and and Go does not
p
Your answer is awesome, thank you
在 2014年2月26日星期三 UTC+13上午6:58:27,Carlos Castillo写道:
>
> First of all, if you are presenting code, you should use playground links.
>
>- You shouldn't be using panic in load, filepath.Walk will return the
>error that load returns if the error is not nil,
On Thu, 10 May 2018 08:33:32 +
Jan Mercl <0xj...@gmail.com> wrote:
> This modified example from another thread does not compile:
You modified it in a pretty significant way. The original example had
type T = *T
which is a recursive type alias (which is disallowed). Your new example
has
typ
On Thu, May 10, 2018 at 1:00 PM roger peppe wrote:
> "The scope of a type identifier declared inside a function begins at
> the identifier in the TypeSpec and ends at the end of the innermost
> containing block."
That's it, thanks. Got bitten by the difference wrt variable decls within a
fn. T
There is a widespread dislike of do-while in C. Pretty much every time I've
wanted it, my code reviewer made me take it out. I agree it has its place
but it's one of those style things that social pressures seem to force. I
would not be the one to try to argue for its return; I couldn't handle the
So sorry to learn of your mistreatment. I've never been struggled in an
anti-do-while cultural revolution, though I can imagine the lasting
emotional harm.
I always* thought that C's "do {stuff} while (cond);" was a victim of
syntax. The cond is far away and hidden from the do. An idea from the Go
*always as in, from learn on 6th edition at BTL in 1977.
On Thu, May 10, 2018 at 3:29 PM Michael Jones
wrote:
> So sorry to learn of your mistreatment. I've never been struggled in an
> anti-do-while cultural revolution, though I can imagine the lasting
> emotional harm.
>
> I always* thought th
Interesting. I've never had that experience in the past 15ish years
doing POSIXish systems stuff. I've always found it the more natural
expression for handling EINTR from syscalls like read/write. I've also
never seen anyone seriously discourage its use in ##c on freenode over
the same-ish timefram
Hi,
I am facing an error "socket, too many open files". By lsof, I found there
are a lot of sessions in ESTABLISHED state.
Then I tried to write a small program which just do http GET. After I add
the timeout, connect close fields as someone else mentioned, I do see the
session closed immediat
On Thu, 10 May 2018 15:02:39 - Michael Jones
wrote:
>
> Maybe the central issue here has been lost because of the confusion between
> English words and the keywords of various languages. Let's be explicit: *a
> controlled looping construct may test the control condition before or after
> the
Hello all,
I am creating a simple licencing system to help licence my own programs and
also to help others via github. I have come across a bug that I don't
really understand and am asking for some advice.
I will add the client code soon. I also hope to add more advanced features.
Basically,
It is likely that HashDecoded is "" (line 28) because
hex.DecodeString() fails, so password check never fails.
On Thu, May 10, 2018 at 7:46 PM, wrote:
> Hello all,
>
> I am creating a simple licencing system to help licence my own programs and
> also to help others via github. I have come across
I think better to use the context of the english language for a
pre-condition checked after:
until Condition() { ... }
Or maybe just exactly mimics for, but does not test until after one run of
the enclosed block:
until Init(); Condition(); PostAssignment() { ... }
On Friday, 11 May 2018 01:
Until implies a negation. The presence of unless in perl is a horror
resulting from the same semantics - I'm sure it seemed like a good idea
at the time.
On Thu, 2018-05-10 at 23:25 -0700, Louki Sumirniy wrote:
> I think better to use the context of the english language for a
> pre-condition chec
20 matches
Mail list logo