Talk:Blogs:AndreiBadea:EnumsInAPIs

From APIDesign

(Difference between revisions)
Jump to: navigation, search
(Comment provided by refrigerator repair - via ArticleComments extension)
Current revision (05:18, 15 January 2014) (edit) (undo)
(Comment provided by Bierly exscort service Jesusa - via ArticleComments extension)
 
(30 intermediate revisions not shown.)
Line 65: Line 65:
--[http://burton.samgorad.info Burton Samograd] 07:18, 12 September 2008 (CEST)
--[http://burton.samgorad.info Burton Samograd] 07:18, 12 September 2008 (CEST)
 +
== escortes Toulouse said ... ==
 +
 +
<div class='commentBlock'>
 +
Seriously! This might be one of the most beneficial weblogs we?ve run into upon thesubject. Essentially amazing publish! I?m another specialized in this particular subject matter so I can understand the working hard.
 +
 +
--escortes Toulouse 23:27, 17 April 2013 (CEST)
 +
</div>
 +
== Paris call girls said ... ==
 +
 +
<div class='commentBlock'>
 +
Discovered your write-up extremely interesting in fact. I genuinely appreciated examining it and also you make fairly some good details. I will bookmark this internet site with the upcoming! Relly excellent short article.
 +
 +
--Paris call girls 11:14, 19 April 2013 (CEST)
 +
</div>
 +
== escorts Paris said ... ==
 +
 +
<div class='commentBlock'>
 +
This is really a amazing blog, would you be interested in making time for an interview concerning just how you made it? If so e-mail myself!
 +
 +
--escorts Paris 01:45, 2 May 2013 (CEST)
 +
</div>
 +
== Paris call girls said ... ==
 +
 +
<div class='commentBlock'>
 +
Have you given any kind of consideration at all with translating your current site in to Spanish? I know a couple of of translaters here which might help you do it for no cost if you want to make contact with me personally.
 +
 +
--Paris call girls 14:18, 14 May 2013 (CEST)
 +
</div>
 +
== Paris call girls said ... ==
 +
 +
<div class='commentBlock'>
 +
I have bookmarked it in my google bookmarks.
 +
 +
--Paris call girls 15:02, 14 May 2013 (CEST)
 +
</div>
 +
== Paris escort said ... ==
 +
 +
<div class='commentBlock'>
 +
<a href=vipescort-girls.com>escort France</a>
 +
<a href=modelfortonight.com>France escorts</a>
 +
<a href=parismodels.biz>Paris escort girls</a>
 +
<a href=vipescort-girls.com>escort Paris</a>
 +
<a href=modelfortonight.com>call girls Paris</a>
 +
<a href=parismodels.biz>Paris escorts</a>
 +
<a href=vipescort-girls.com>Paris escorts</a>
 +
<a href=modelfortonight.com>France escorts</a>
 +
<a href=parismodels.biz>escortes Paris</a>
 +
<a href=vipescort-girls.com>escort service Paris</a>
 +
 +
--Paris escort 15:01, 1 June 2013 (CEST)
</div>
</div>
-
== Daniel Thoma said ... ==
+
== escorte toulouse said ... ==
<div class='commentBlock'>
<div class='commentBlock'>
-
There are cases, where enums represent a finit set of possibilities (typically abstract things, operations in some calculus, base-dimensions of an color space etc.). Extending such an enum doesn't make sense, since there is a theory that determines all possible values. More often are cases, where an enum represents a subset of a possibly infinite set of values. (error-codes, currencies, countries, ...)
+
I definitely desired to deliver a quick concept to thank you for the nice tips and hints you're posting on wiki.apidesign.org . My time-consuming internet appear up has now been rewarded with helpful strategies to exchange with my family and friends. I'd claim that we readers fact are truly blessed to dwell in a helpful community with incredibly some great individuals with insightful points. I really feel really grateful to get discovered the webpage and appear ahead to a lot of additional entertaining moments reading right here. Thanks a good deal again for a good deal of things.
-
It would be a nice idea to distinguish these types of enums at language level or by an annotation. A compiler then could at least recognise certain scenarios of missusage and the developer would know, whether he has to care about unknown values.
+
-
--Daniel Thoma 18:09, 16 September 2008 (CEST)
+
--escorte toulouse 12:52, 8 June 2013 (CEST)
</div>
</div>
-
== lighting manufacturers in the UK said ... ==
+
== escort bordeaux said ... ==
<div class='commentBlock'>
<div class='commentBlock'>
-
Congratulations on possessing definitely one in every of one of the crucial sophisticated blogs Ive arrive throughout in some time! Its simply amazing how much you’ll be capable to take into account away from a thing mainly simply due to how visually stunning it is. Youve place collectively a fantastic weblog website area –great graphics, motion pictures, layout. This is actually a should-see website!
+
exceptional site post. I am going to bookmark wiki.apidesign.org and check out a lot more often. I really like the website template
-
--[http://lighting-wholesales.com lighting manufacturers in the UK] 04:34, 2 September 2011 (CEST)
+
--escort bordeaux 14:18, 8 June 2013 (CEST)
</div>
</div>
-
== lighting manufacturers in the UK said ... ==
+
== France escort said ... ==
<div class='commentBlock'>
<div class='commentBlock'>
-
hey all, I was simply checkin’ out this weblog and I really admire the premise of the article, and don't have anything to do, so if anybody wish to to have an engrossing convo about it, please contact me on AIM, my name is heather smith
+
Quelqu'un sait-il la musique qui joue sur le Secret Diary of a Girl annonce de l'appel itv?.
-
--[http://lighting-wholesales.com lighting manufacturers in the UK] 22:13, 8 September 2011 (CEST)
+
--France escort 17:09, 9 August 2013 (CEST)
</div>
</div>
-
== refrigerator repair said ... ==
+
== Bierly exscort service Jesusa said ... ==
<div class='commentBlock'>
<div class='commentBlock'>
-
Én akartam, hogy tegye valami ilyesmi a honlapomon, és ez adott nekem egy ötletet. Egészségedre.
+
How to apply a wordpress theme downloaded from other websites?
-
--[http://ccappliancerepair.com/map/ refrigerator repair] 08:10, 23 September 2011 (CEST)
+
--Bierly exscort service Jesusa 06:18, 15 January 2014 (CET)
</div>
</div>

Current revision

Comments on Blogs:AndreiBadea:EnumsInAPIs <comments />


Contents

Alex said ...

Normally in a release version one wouldn't want any asserts enabled so maybe not a very big problem? The general principle is if you are designing a library you don't make any assumptions on how your client calls your API. Perhaps I'm wrong though...

--Alex 20:21, 16 July 2008 (CEST)

Vincent Cantin said ...

In this example, if the user wanted to ensure that he covers all the fields of the enumeration, then he wrote something wrong, he should not have the "default:" case.

If the switch covers all the fields of the enumeration, the "default:" is not needed and not warnings/errors are generated at compile time.

We can also assume that if the user use the default close here, his meaning is not to cover all the fields of the enumeration, but to only cover a subset and throw an assert exception when encounter a field of the complementary subset or null.


--Vincent Cantin 03:26, 17 July 2008 (CEST)

Andrei Badea said ...

To Alex: I have also seen IllegalStateException's thrown instead of an assert statement. Regarding the assumptions, you are right. But this case looks like one where you could want to break the rule. Not being able to add fields to the enum could be a big limitation.

To Vincent: you are right, many people have a default branch just to be sure, even when they know they have covered all fields of the enum (of the current version of the enum, that is).


--AndreiBadea 15:41, 17 July 2008 (CEST)

Alex said ...

Could want to break a rule? This rule having been expressed in various ways by hthe MONSTERS of computer science would be then too strong for me to want to break it. There must be a subtlety I'm missing when following your example. I shall work on that further. That is after I've studied the design patterns. Otherwise no chance for me to pass the exams. Thanks!!

--Alex 23:28, 17 July 2008 (CEST)

Joel Neely said ...

Doesn't this depend on how the enum is used?

If a value of the enumerated type is in the result of an API method, and the switch statement above is in the client, and the new value can be returned in a result produced by previous-version client behavior, then adding a value to the enum can cause breakage.

But if the only uses of the enumerated type are in arguments to API methods, or the new value can only appear in a result for a request that used other new–version aspects, then this specific opportunity for error doesn't arise.

It is still possible for new semantic requirements (e.g. a rule that the new enum value is required in certain cases) to break the client.

I suggest that the real issue is this: if the new API still accepts all prior-version arguments and (for those arguments) returns the same results, then there's no breakage. Breakage occurs when a new version fails to accept previously-valid arguments, or returns results that previously could not occur.

--Joel Neely 13:37, 25 August 2008 (CEST)

Burton Samograd said ...

If you compile your release with _NDEBUG the switch will fall through just fine since the assert macros are removed from the release code. This should be decent behaviour even with new binary versions of the code if the new enums are always added at the end.

Developers running debug code *might* catch the new enum value if it is set by the library, and the failed assertion will alert them to the new value that is available.

Basically it comes down to programming practices and disciplines for it to work, which are sometimes difficult to maintain in multi-user distributed development.

--Burton Samograd 07:18, 12 September 2008 (CEST)

escortes Toulouse said ...

Seriously! This might be one of the most beneficial weblogs we?ve run into upon thesubject. Essentially amazing publish! I?m another specialized in this particular subject matter so I can understand the working hard.

--escortes Toulouse 23:27, 17 April 2013 (CEST)

Paris call girls said ...

Discovered your write-up extremely interesting in fact. I genuinely appreciated examining it and also you make fairly some good details. I will bookmark this internet site with the upcoming! Relly excellent short article.

--Paris call girls 11:14, 19 April 2013 (CEST)

escorts Paris said ...

This is really a amazing blog, would you be interested in making time for an interview concerning just how you made it? If so e-mail myself!

--escorts Paris 01:45, 2 May 2013 (CEST)

Paris call girls said ...

Have you given any kind of consideration at all with translating your current site in to Spanish? I know a couple of of translaters here which might help you do it for no cost if you want to make contact with me personally.

--Paris call girls 14:18, 14 May 2013 (CEST)

Paris call girls said ...

I have bookmarked it in my google bookmarks.

--Paris call girls 15:02, 14 May 2013 (CEST)

Paris escort said ...

<a href=vipescort-girls.com>escort France</a> <a href=modelfortonight.com>France escorts</a> <a href=parismodels.biz>Paris escort girls</a> <a href=vipescort-girls.com>escort Paris</a> <a href=modelfortonight.com>call girls Paris</a> <a href=parismodels.biz>Paris escorts</a> <a href=vipescort-girls.com>Paris escorts</a> <a href=modelfortonight.com>France escorts</a> <a href=parismodels.biz>escortes Paris</a> <a href=vipescort-girls.com>escort service Paris</a>

--Paris escort 15:01, 1 June 2013 (CEST)

escorte toulouse said ...

I definitely desired to deliver a quick concept to thank you for the nice tips and hints you're posting on wiki.apidesign.org . My time-consuming internet appear up has now been rewarded with helpful strategies to exchange with my family and friends. I'd claim that we readers fact are truly blessed to dwell in a helpful community with incredibly some great individuals with insightful points. I really feel really grateful to get discovered the webpage and appear ahead to a lot of additional entertaining moments reading right here. Thanks a good deal again for a good deal of things.

--escorte toulouse 12:52, 8 June 2013 (CEST)

escort bordeaux said ...

exceptional site post. I am going to bookmark wiki.apidesign.org and check out a lot more often. I really like the website template

--escort bordeaux 14:18, 8 June 2013 (CEST)

France escort said ...

Quelqu'un sait-il la musique qui joue sur le Secret Diary of a Girl annonce de l'appel itv?.

--France escort 17:09, 9 August 2013 (CEST)

Bierly exscort service Jesusa said ...

How to apply a wordpress theme downloaded from other websites?

--Bierly exscort service Jesusa 06:18, 15 January 2014 (CET)

Personal tools
buy