|
Bas de page | |
---|---|
Auteur | Sujet : Pourquoi tout n'est pasobjet dans java ? |
![]() Publicité | Posté le 28-03-2007 à 16:48:19 ![]() ![]() |
flo850 moi je | pour simplifier les choses simples
|
_darkalt3_ Proctopathe |
--------------- Töp of the plöp |
kadreg profil: Utilisateur |
|
flo850 moi je |
|
_darkalt3_ Proctopathe |
--------------- Töp of the plöp |
kadreg profil: Utilisateur |
|
Giz | Question performance aussi fait que les types primitifs ont été gardés. Alloué un objet est couteux. |
meringue7 |
|
![]() Publicité | Posté le 28-03-2007 à 17:32:11 ![]() ![]() |
meringue7 |
|
kadreg profil: Utilisateur |
|
masklinn í dag viðrar vel til loftárása |
Si on prend l'exemple de Ruby
Il est beaucoup plus illogique de créer cette dichotomie entre les types primitifs et les types objets sans aucune raison Message cité 2 fois Message édité par masklinn le 28-03-2007 à 17:43:30 --------------- I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing? |
meringue7 |
|
kadreg profil: Utilisateur |
Il est rigolo plop(3) appelle plop(Object) au lieu de pas trouver Message cité 1 fois Message édité par kadreg le 28-03-2007 à 18:15:05 |
masklinn í dag viðrar vel til loftárása |
--------------- I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing? |
Chronoklazm |
Message cité 1 fois Message édité par Chronoklazm le 28-03-2007 à 19:31:00 --------------- Scheme is a programmable programming language ! I heard it through the grapevine ! |
masklinn í dag viðrar vel til loftárása |
--------------- I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing? |
Chronoklazm |
Message cité 1 fois Message édité par Chronoklazm le 29-03-2007 à 00:58:52 --------------- Scheme is a programmable programming language ! I heard it through the grapevine ! |
0x90 → |
Je vois pas en quoi le fait de faire
Message édité par 0x90 le 29-03-2007 à 02:14:20 --------------- Me: Django Localization, Yogo Puzzle, Chrome Grapher, C++ Signals, Brainf*ck. |
meringue7 | donc je suis plutot d accord avec Masklinn , mais alors pourquoi avoir mis des types primitifs à votre avis ?
|
masklinn í dag viðrar vel til loftárása |
Suffit de regarder C#, tu manipules tes ints strictement comme un `int` Java jusqu'au moment ou tu as besoin de manipuler un Integer: en Java tu es obligé de wrapper, et tu ne peux pas indexer tes collections génériques sur <int> (tu dois les indexer sur <Integer> ), en C# ton int a directement une interface d'objet donc tu ne te poses pas de question
De plus le cas 1 demande impérativement l'ajout d'operator overloading, au moins pour les classes "built-in" du langage (ce qu'a déjà Java d'ailleurs, "+" est overloadé sur les String pour effectuer des conversions + concaténations). Au final, c'est la seule raison que je vois: se simplifier la tâche parce qu'on a pas envie de s'emmerder. Message édité par masklinn le 29-03-2007 à 11:30:44 --------------- I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing? |
![]() Publicité | Posté le ![]() ![]() |