"empty classes in Java" what does that mean?

as I said, structs are an optimization on maps, that optimization
doesn't work for empty structs, so empty structs "of course" don't
make sense

On Wed, Jan 20, 2010 at 12:39 AM, Andreas Wenger
<andi.xeno...@googlemail.com> wrote:
>> I think your use of "workaround" is pejorative. And can it even be
>> called a work around if it is a best practice even when there is
>> nothing to work around?
>
> I just can't understand why throwing an exception should be more
> useful than returning some object you can actually work with.
> I wouldn't throw an exception for empty vectors or list either. Why
> artificially introducing this constraint where it is not necessary at
> all?
>
> Please help me to understand why I am wrong. Why are empty structs in
> C, empty classes in Java, empty hashmaps in Clojure, why are all of
> these objects allowed (of course, because it makes sense), but empty
> defstructs are forbidden by a if-empty-then-exception where it is not
> necessary or helpful at all?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>



-- 
And what is good, Phaedrus,
And what is not good—
Need we ask anyone to tell us these things?
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to