|
|
Choosing A Webhost: |
Re: Pike 7.8: msg#00047lang.pike.devel
I guess the conversation has come full circle... I think it comes down to a decision between a) doing nothing and having to work around the problem in awkward ways and b) implimenting something that either breaks existing behavior (true null) or acts inconsistently (null value that is comparable to itself but acts like a zero in all other ways). My biggest problem in all of this is that there's no way to differentiate between an integer that hasn't been specified (UNDEFINED or nil) and one whose value is simply zero. I think the introduction of UNDEFINED was bound to cause it to be misused, especially since a) there's a gap here in the language that (right or wrong) many other languages don't have and b) the discussion introducing UNDEFINED suggested it had a nil-like quality when used as an argument to methods. It's further complicated by the multiple identities of zero: both 0 == UNDEFINED and 0 == 0 are all true... that's why I suggested that there be a new zero type to signify a value that's not been set, and have it be NULL or something. It would also be nice if UNDEFINED == UNDEFINED were true and 0 == UNDEFINED were false, but I haven't thought through all of the implications of that. It certainly would break some existing behavior that rely on that initially set value acting as a zero. It's probably enough to be able to query specifically the "intent" rather than to have comparisons look at the intent (undefined, index not present, object destructed). Additionally, as I think some has mentioned, it's fine to have abstractions use their own entities for things like NULL and true/ false, but a big problem is that pike doesn't have a way to express these things that don't overlap with another datatype (is a zero 0, or null or false?). Anyhow, I guess I don't have anything more to contribute. Bill On Nov 24, 2007, at 12:20 AM, Johan Sundström (Achtung Liebe!) @ Pike (-) developers forum wrote: I don't agree, perhaps not strongly, but still not. Having the same
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Pike 7.8, Martin Stjernholm, Roxen IS @ Pike developers forum |
|---|---|
| Next by Date: | Re: Pike 7.8, Martin Stjernholm, Roxen IS @ Pike developers forum |
| Previous by Thread: | Re: Pike 7.8, Martin Stjernholm, Roxen IS @ Pike developers forum |
| Next by Thread: | Re: Pike 7.8, Martin Stjernholm, Roxen IS @ Pike developers forum |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |