It might be worth also saying something about finalization. I think the choices
are to do nothing (be finalizer-agnostic) or to prohibit it. Generating a
finalize() method for every record class seems like a non-starter.
I'm leaning toward prohibiting finalization, for a couple reasons. First,
Hi all,
why Record is a class (an abstract class) and not an interface ?
It's a fair question. At this point, it could go either way, and both
have pros and cons.
Being an interface also means that we will be able to mix an inline
type and a record, an inline record?, for free, and more g
> À: "amber-spec-experts"
> Envoyé: Jeudi 15 Août 2019 19:06:02
> Objet: Draft specification for java.lang.Record
> Draft spec, please comment.
> /* * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. *
> DO
> NOT ALTER OR REMOVE COPYRIGHT NOT
/** * This is the common base class of all Java language record
classes.
Well, and /only/ record classes -- it can't be extended manually. It
seems useful to understand both necessity and sufficiency, though I
notice Enum also doesn't say this.
Right, that's something for the JLS to
On 8/15/2019 12:18 PM, Brian Goetz wrote:
Cloning: if a record class was to implement Cloneable, then the
inherited implementation of Object::clone would not preserve copy
equality (because, yes, cloning is not the same as copying). Recommend
not implementing Cloneable?
We have an opportunit
I am reading this javadoc from the POV of someone in 2034 (15 years
hence, like we are 15 years from Enum) who doesn't know anything about
Amber.
On 8/15/2019 10:34 AM, Brian Goetz wrote:
/**
* This is the common base class of all Java language record classes.
I know this borrows from Enum
Re-sending as plain text, since the formatting got mangled by mailers.
/*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* und
Hello!
equals() spec says:
The implicitly provided implementation returns {@code true} if
and * only if the argument is an instance of the same record type
as this object, * and each component of this record is equal to
the corresponding component * of the argument, according to
Hello!
>a private static field corresponding to each component
Final instead of static?
With best regards,
Tagir Valeev
пт, 16 авг. 2019 г., 0:06 Brian Goetz :
> Draft spec, please comment.
>
>
> /* * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. *
> DO NOT ALTER OR R
Draft spec, please comment.
/* * Copyright (c) 2019, Oracle and/or its affiliates. All rights
reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE
HEADER. * * This code is free software; you can redistribute it and/or
modify it * under the terms of the GNU General Public License v
10 matches
Mail list logo