[Nickle] const vs. final

Bart Massey bart at po8.org
Sun Aug 22 17:21:06 PDT 2004


I think Jamey's main complaint may have been that the error
message is buggy, which seems true.  Certainly he shouldn't
have expected to be able to assign a const---oh wait, he's
thinking of the gosh-awful C "const" parameters.  No, Jamey
there aren't any of those in Nickle, thank goodness.

I also agree that there's an odd hole in the language with
enums.  One would like to be able to get one's hand on the
ordinality and cardinality of a tag as in C, but right now
we hide it.  I understand the reasons for this, but at the
same time I'm tempted to expose the tag values via
conversion functions, as I believe we thought we would do in
the past...

Our enums are kind of horrible, as we know.  Maybe we should
do some kind of Scheme-style "symbols" instead of disjoint
union types?

	Bart

In message <E1ByLR9-0004Da-T7 at evo.keithp.com> you wrote:
> --===============1002673125==
> Content-Type: multipart/signed; boundary="==_Exmh_2049461588P";
> 	micalg=pgp-sha1; protocol="application/pgp-signature"
> Content-Transfer-Encoding: 7bit
> 
> --==_Exmh_2049461588P
> Content-Type: text/plain; charset=us-ascii
> 
> 
> Around 16 o'clock on Aug 18, Jamey Sharp wrote:
> 
> > The behavior that I want is like Java's 'final'. Assignments to
> > uninitialized const values should be allowed. Is there something wrong
> > with doing that?
> 
> const can only be assigned in their initializer.  Given the flexibilty 
> available with nickle initializers, is there some functionality we're 
> missing that you need? Your 'enumerate' function seems quite suited to a 
> comprehension...
> 
> -keith
> 
> 
> 
> --==_Exmh_2049461588P
> Content-Type: application/pgp-signature
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.5 (GNU/Linux)
> Comment: Exmh version 2.3.1 11/28/2001
> 
> iD8DBQFBJrCXQp8BWwlsTdMRApDqAKDCNd26EULqYI1kzlxRbrG69J32rQCeIte/
> 66ErfptOAnBZv7XJRd42c3g=
> =uHuL
> -----END PGP SIGNATURE-----
> 
> --==_Exmh_2049461588P--
> 
> 
> --===============1002673125==
> Content-Type: text/plain; charset="us-ascii"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline
> 
> _______________________________________________
> Nickle mailing list
> Nickle at nickle.org
> http://nickle.org/mailman/listinfo/nickle
> 
> --===============1002673125==--
> 



More information about the Nickle mailing list