The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Re: Type Safe Enums and my issues....

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Re: Type Safe Enums and my issues.... Posted: Aug 17, 2004 8:02 AM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Re: Type Safe Enums and my issues....
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Cincom Smalltalk Blog - Smalltalk with Rants

Advertisement
Wicked Questions asks whether Smalltalk (or other languages) use type safe enums or real objects. Well - In Smalltalk, all we have are objects. You would model the behavior you want (as guessed below)

The problem is this: in Java, methods can either return some value or return no value (void). There might be cases where one might have to do some processing after decoding (an enum) and return some value. I suppose the handler interface can be defined to return Object (oops! casting sneaks in!), but then there are also situations where there will be nothing to return (returning null is ugly). I suppose two kinds of handlers are needed one where each method returns Object and another handler where each method returns void.

Does projects using Smalltalk or Eiffel have these 'type safe enums' at all ?%A0 Or is that when using those languages these entities are modelled as objects with behavior (this is my current uninformed guess)?

Read: Re: Type Safe Enums and my issues....

Topic: A day on the Mall Previous Topic   Next Topic Topic: Those brilliant Gartner guys

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use