本文介绍了也许,毕竟@decorator语法可能还可以的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 可能只是@decorator可能不是那么糟糕。当你看到b $ b看看使用它的代码时,它毕竟不是那么丑陋。 很多关于这个的骚动可能是因为它发生了所以 quicly。如果我们在一周之前看到一个 的声明,那么情况可能会有所不同,我已经选择了这种语法 - 它会进入下一个alpha。 我的主要担心是扔掉少数未使用的ascii符号中的一个, 但是如果我们看一下perl6,就会有一个很多有前途的unicode 符号可供选择;-)。此外,还有@(), @#,@ {}和假设事件中的其他人BDFL希望将@ 用于未来的功能,如宏,红宝石阻止或者其他什么。 如果我们在并行的宇宙中,我会投票+0代表@decorator 哪个重要。两天前我才-10。 - Ville Vainio http://tinyurl.com/2prnb 解决方案 同样在这里。我反对一般的独裁统治 - 我在铁幕后面长大了 - 但是到目前为止BDFL的决定大多是有利的,所以我'我会和他决定的任何事情一起生活(我不是说这听起来很严肃。) AdSR 对。装饰者的唯一好处是他们可以在装饰的开始处获得装饰 。尝试 理解代码时,地点很重要。 - Mark It might just be that @decorator might not be all that bad. When youlook at code that uses it it''s not that ugly after all. A lot of the furor about this is probably because it happened soquicly. The situation might have been different if we had seen apronouncement a week before, in the vein of "I have chosen this syntax- it will go in to the next alpha". My chief worry was throwing away one of the few unused ascii symbols,but if we take a look at perl6, there is a lot of promising unicodesymbols to choose from in the future ;-). Also, there is still @(),@#, @{} and others in the hypothetical event BDFL would like to use @for future features like macros, ruby blocks or whatever. So I would vote +0 for @decorator if we were in the parallel universewhere that mattered. Two days ago I was -10. --Ville Vainio http://tinyurl.com/2prnb 解决方案 Same here. I''m opposed to dictatorship in general - I grew up behindthe Iron Curtain - but the BDFL''s decisions so far were mostlybeneficial, so I''ll live with whatever he decides (I''m not saying thisas seriously as it sounds). AdSR Right. The only benefit of decorators is that they get the decorationcloser to the start of the decorated. Locality matters when trying tounderstand code. -- Mark 这篇关于也许,毕竟@decorator语法可能还可以的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-21 02:31